tomobar.supp.dicts

Contents

tomobar.supp.dicts#

tomobar.supp.dicts.dicts_check(self, _data_: dict, _algorithm_: dict | None = None, _regularisation_: dict | None = None, method_run: str = 'FISTA') tuple[source]#

This function accepts the _data_, _algorithm_, and _regularisation_ dictionaries and populates parameters in them, if required. Please note that the dictionaries are needed for iterative methods only. The most versatile methods that can accept a variety of different parameters are FISTA and ADMM.

Parameters:
  • _data_ (dict) – Data dictionary where data-related items must be specified.

  • _algorithm_ (dict, optional) – Algorithm dictionary. Defaults to None.

  • _regularisation_ (dict, optional) – Regularisation dictionary. Needed only for FISTA and ADMM algorithms. Defaults to None.

  • method_run (str) – The name of the method to be run. Defaults to “FISTA”.

Keyword Arguments:
  • _data_['projection_data'] (ndarray) – Can be either projection data after negative log or raw data given as a 3D CuPy array.

  • _data_['data_axes_labels_order'] (list, None) – [“detY”, “angles”, “detX”].

  • _data_['data_fidelity'] (str). Data fidelity given as 'LS' (Least Squares), 'PWLS' (Penalised Weightes LS), 'KL' (Kullback Leilbler)

  • _algorithm_['iterations'] (int) – The number of iterations for the reconstruction algorithm.

  • _algorithm_['nonnegativity'] (bool) – Enable nonnegativity for the solution. Defaults to False.

  • _algorithm_['recon_mask_radius'] (float) – Enables the circular mask cutoff in the reconstructed image. Defaults to 1.0.

  • _algorithm_['initialise'] (ndarray) – Initialisation for the solution. An array of the expected output size must be provided.

  • _algorithm_['lipschitz_const'] (float) – Lipschitz constant for the FISTA and ADMM algorithms. If not provided, it will be calculated for each method call.

  • _algorithm_['ADMM_rho_const'] (float) – Augmented Lagrangian parameter for the ADMM algorithm.

  • _algorithm_['ADMM_relax_par'] (float) – Over relaxation parameter for the convergence acceleration of the ADMM algorithm. Values within 1.5-1.8 range work well.

  • _algorithm_['tolerance'] (float) – Tolerance to terminate reconstruction algorithm iterations earlier. Defaults to 0.0.

  • _algorithm_['verbose'] (bool) – Switch on printing of iterations number and other messages. Defaults to False.

  • _regularisation_['method'] (str) – Select the regularisation method for noise supression. The supported methods are: ROF_TV, PD_TV.

  • _regularisation_['regul_param'] (float) – The main regularisation parameter for regularisers to control the amount of smoothing. Defaults to 0.001.

  • _regularisation_['iterations'] (int) – The number of iterations for regularisers (INNER iterations). Defaults to 150.

  • _regularisation_['device_regulariser'] (int) – A GPU device index to perform operation on. Defaults to 0.

  • _regularisation_['time_marching_step'] (float) – Time step parameter for convergence of gradient-based methods: ROF_TV.

  • _regularisation_['PD_LipschitzConstant'] (float) – The Primal-Dual (PD) penalty related parameter for convergence (PD_TV specific).

  • _regularisation_['methodTV'] (int) – 0/1 - TV specific isotropic/anisotropic choice.

Returns:

A tuple with three populated dictionaries (_data_, _algorithm_, _regularisation_).

Return type:

tuple