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: FitImaging

Fit 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_image

chi_squared

Returns the chi-squared terms of the model data's fit to an dataset, by summing the chi-squared-map.

chi_squared_map

Returns the chi-squared-map between the residual-map and noise-map, where:

chi_squared_map_of_parallel_eper

chi_squared_map_of_regions_ci

chi_squared_map_of_serial_eper

chi_squared_map_of_serial_overscan_no_eper

data

figure_of_merit

image

imaging

imaging_ci

inversion

Overwrite this method so it returns the inversion used to fit the dataset.

layout

log_evidence

Returns 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_likelihood

Returns the log likelihood of each model data point's fit to the dataset, where:

log_likelihood_with_regularization

Returns the log likelihood of an inversion's fit to the dataset, including a regularization term which comes from an inversion:

mask

Overwrite this method so it returns the mask of the dataset which is fitted to the input data.

model_data

Overwrite this method so it returns the model-data which is fitted to the input data.

model_image

noise_map

noise_normalization

Returns the noise-map normalization term of the noise-map, summing the noise_map value in every pixel as:

normalized_residual_map

Returns the normalized residual-map between the masked dataset and model data, where:

pre_cti_data

reduced_chi_squared

residual_flux_fraction_map

Returns the residual flux fraction map, which shows the fraction of signal in each pixel that is not fitted by the model, therefore where:

residual_map

Returns the residual-map between the masked dataset and model data, where:

signal_to_noise_map

The 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.

property noise_normalization: float#

Returns the noise-map normalization term of the noise-map, summing the noise_map value in every pixel as:

[Noise_Term] = sum(log(2*pi*[Noise]**2.0))