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_norm_data'] (ndarray) – Negative log(normalised) projection data as a 2D sinogram or as a 3D data array.
_data_['projection_raw_data'] (ndarray) – Raw data for PWLS and SWLS models. A FISTA-related parameter.
_data_['data_axes_labels_order'] (list, None) – [“detY”, “angles”, “detX”].
_data_['OS_number'] (int) – The number of the ordered subsets. If None or 1 is used then the classical (full data) algorithm executed. Defaults to 1.
_data_['huber_threshold'] (float) – Parameter for the Huber data fidelity (to suppress outliers) [KAZ1_2017].
_data_['studentst_threshold] (float) – Parameter for Students’t data fidelity (to suppress outliers) [KAZ1_2017].
_data_['ringGH_lambda'] (float) – Parameter for Group-Huber data model [PM2015] to suppress the full rings of the uniform intensity.
_data_['ringGH_accelerate'] (float) – Group-Huber data model acceleration factor (can lead to divergence for higher values). Defaults to 50.
_data_['beta_SWLS'] (float) – Regularisation parameter for stripe-weighted data model [HOA2017] for ring artefacts removal. Defaults to 0.1.
_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 algorithm. 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.
_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 from the CCPi-regularisation toolkit [KAZ2019]. The supported methods listed: ROF_TV, FGP_TV, PD_TV, SB_TV, LLT_ROF, TGV, NDF, Diff4th, NLTV. If the pypwt package is installed for Wavelets, then one can do WAVELET regularisation by adding WAVELETS string to any method’s name above. For instance, ROF_TV_WAVELETS would enable dual regularisation with ROF_TV and wavelets. See regul_param2 to control wavelets smoothing.
_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'] (str, int) – Select between ‘cpu’ or ‘gpu’ devices. One can also provide a GPU index (integer) of a specific GPU device.
_regularisation_['edge_threhsold'] (float) – Noise-related threshold parameter for NDF and DIFF4th (diffusion) regularisers.
_regularisation_['tolerance'] (float) – Tolerance to stop inner regularisation iterations prematurely.
_regularisation_['time_marching_step'] (float) – Time step parameter for convergence of gradient-based methods: ROF_TV, LLT_ROF, NDF,Diff4th.
_regularisation_['regul_param2'] (float) – The second regularisation parameter for LLT_ROF or when WAVELETS used.
_regularisation_['TGV_alpha1'] (float) – The TGV penalty specific parameter for the 1st order term.
_regularisation_['TGV_alpha2'] (float) – The TGV penalty specific parameter for the 2nd order term.
_regularisation_['PD_LipschitzConstant'] (float) – The Primal-Dual (PD) penalty related parameter for convergence (PD_TV and TGV specific).
_regularisation_['NDF_penalty'] (str) – The NDF-method specific penalty type: Huber (default), Perona, Tukey.
_regularisation_['NLTV_H_i'] (ndarray) – The NLTV penalty related weights, the array of i-related indices.
_regularisation_['NLTV_H_j'] (ndarray) – The NLTV penalty related weights, the array of j-related indices.
_regularisation_['NLTV_Weights] (ndarray) – The NLTV-specific penalty type, the array of Weights.
_regularisation_['methodTV'] (int) – 0/1 - TV specific isotropic/anisotropic choice.
- Returns:
A tuple with three populated dictionaries (_data_, _algorithm_, _regularisation_).
- Return type:
tuple