Exemplo n.º 1
0
 def __init__(self):
     self.template = None
     self.start_time = time.time()
     self.estimation_time = 0
     self.number_of_images = len(const.FLAT_IMAGES)
     self.alphas: np.ndarray = const.ALPHAS_INIT
     self.betas = [const.BETAS_INIT] * self.number_of_images
     self.sd2: int = const.SD_INIT
     # KBP ARE SPARSE
     self.kBps = \
         list(map((lambda beta: func.calculate_kBp(beta)),
                  self.betas))
     # self.Gamma: np.ndarray = const.SIGMA_G
     self.Gamma_Inv = const.SPARSE_SIGMA_G_INV
     self.images = const.FLAT_IMAGES
     yty = list(
         map((lambda image: func.faster_norm_squared(image)), self.images))
     self.YTY = (1 / self.number_of_images) \
                * sum(yty)  # Many images
     self.predictions = None
     self.Gamma_update_count = 0
     self.asd2_update_count = 0
Exemplo n.º 2
0
 def update_kBps(self):  # Can be part of minimization?
     self.kBps = list(
         map((lambda beta: func.calculate_kBp(beta)), self.betas))