autocti.FitImagingCI#
- class autocti.FitImagingCI(dataset: ~autocti.charge_injection.imaging.imaging.ImagingCI, post_cti_data: ~autoarray.structures.arrays.uniform_2d.Array2D, hyper_noise_scalar_dict: ~typing.Optional[~typing.Dict] = None, preloads: ~autocti.preloads.Preloads = <autocti.preloads.Preloads object>)[source]#
Bases:
FitImagingFit a charge injection ci_data-set with a model cti image, also scalng the noises within a Bayesian framework.
- Parameters:
dataset – The charge injection image that is fitted.
post_cti_data – The pre_cti_data with cti added to it via the clocker and a CTI model.
hyper_noise_scalar_dict – The hyper_ci-parameter(s) which the noise_scaling_map_dict_list is multiplied by to scale the noise-map.
Methods
Attributes
blurred_imageReturns the chi-squared terms of the model data's fit to an dataset, by summing the chi-squared-map.
chi_squared_mapReturns the chi-squared-map between the residual-map and noise-map, where:
chi_squared_map_of_parallel_eperchi_squared_map_of_regions_cichi_squared_map_of_serial_eperchi_squared_map_of_serial_overscan_no_eperdatafigure_of_meritimageimagingimaging_ciinversionOverwrite this method so it returns the inversion used to fit the dataset.
layoutlog_evidenceReturns the log evidence of the inversion's fit to a dataset, where the log evidence includes a number of terms which quantify the complexity of an inversion's reconstruction (see the Inversion module):
log_likelihoodReturns the log likelihood of each model data point's fit to the dataset, where:
log_likelihood_with_regularizationReturns the log likelihood of an inversion's fit to the dataset, including a regularization term which comes from an inversion:
maskOverwrite this method so it returns the mask of the dataset which is fitted to the input data.
Overwrite this method so it returns the model-data which is fitted to the input data.
model_imagenoise_mapReturns the noise-map normalization term of the noise-map, summing the noise_map value in every pixel as:
normalized_residual_mapReturns the normalized residual-map between the masked dataset and model data, where:
pre_cti_datareduced_chi_squaredresidual_mapReturns the residual-map between the masked dataset and model data, where:
signal_to_noise_mapThe signal-to-noise_map of the dataset and noise-map which are fitted.
- property model_data: Array2D#
Overwrite this method so it returns the model-data which is fitted to the input data.
- property chi_squared: float#
Returns the chi-squared terms of the model data’s fit to an dataset, by summing the chi-squared-map.
If the dataset includes a noise covariance matrix, this is used instead to account for covariance in the goodness-of-fit.
The standard chi-squared calculation in PyAutoArray computes the chi-squared from the residual_map and chi_squared_map, which requires that the ndarrays which are used to do this are created and stored in memory. For charge injection imaging, the large datasets mean this can be computationally slow.
This function computes the chi_squared directly from the data, avoiding the need to store the data in memory and offering faster tune times.