pytomography.callbacks.data_saving#

Module Contents#

Classes#

DataStorageCallback

Callback that stores the object and forward projection at each iteration

class pytomography.callbacks.data_saving.DataStorageCallback(likelihood, object_initial)[source]#

Bases: pytomography.callbacks.callback.Callback

Callback that stores the object and forward projection at each iteration

Parameters:
  • likelihood (Likelihood) – Likelihood function used in reconstruction

  • object_initial (torch.Tensor[Lx, Ly, Lz]) – Initial object in the reconstruction algorithm

run(object, n_iter, n_subset)[source]#

Applies the callback

Parameters:
  • object (torch.Tensor[Lx, Ly, Lz]) – Object at current iteration

  • n_iter (int) – Current iteration number

  • n_subset (int) – Current subset index

Returns:

Original object passed (object is not modifed)

Return type:

torch.Tensor

finalize(object)[source]#

Finalizes the callback after all iterations are called

Parameters:

object (torch.Tensor[Lx, Ly, Lz]) – Reconstructed object (all iterations/subsets completed)