autocti.AnalysisImagingCI#
- class autocti.AnalysisImagingCI(dataset: ~autocti.charge_injection.imaging.imaging.ImagingCI, clocker: ~autocti.clocker.two_d.Clocker2D, settings_cti: ~autocti.model.settings.SettingsCTI2D = <autocti.model.settings.SettingsCTI2D object>, dataset_full: ~typing.Optional[~autocti.charge_injection.imaging.imaging.ImagingCI] = None)[source]#
Bases:
Analysis
Methods
fit_via_instance_and_dataset_from
fit_via_instance_from
Determine the fitness of a particular model
make_result
modify_after_fit
Overwrite this method to modify the attributes of the Analysis class before the non-linear search begins.
PyAutoFit calls this function immediately before the non-linear search begins, therefore it can be used to perform tasks using the final model parameterization.
modify_model
profile_log_likelihood_function
Overwrite this function for profiling of the log likelihood function to be performed every update of a non-linear search.
Inspects the CTI model and determines which regions are fitted for and therefore should be visualized.
Before the model-fit via the non-linear search begins, this routine saves attributes of the Analysis object to the pickles folder such that they can be loaded after the analysis using PyAutoFit's database and aggregator tools.
save_results_for_aggregator
should_visualize
Whether a visualize method should be called perform visualization, which depends on the following:
visualize
visualize_before_fit
visualize_before_fit_combined
visualize_combined
with_model
Associate an explicit model with this analysis.
- region_list_from(model: Collection) List [source]#
Inspects the CTI model and determines which regions are fitted for and therefore should be visualized.
For example, if the model only includes parallel CTI, the serial regions are not fitted for and thus are not visualized.
- Parameters:
model – The CTI model, composed via PyAutoFit, which represents the parallel and serial CTI model compoenents fitted for by the non-linear search.
- Return type:
A list of the regions fitted for by the model and therefore visualized.
- modify_before_fit(paths: DirectoryPaths, model: Collection)[source]#
PyAutoFit calls this function immediately before the non-linear search begins, therefore it can be used to perform tasks using the final model parameterization.
This function:
Visualizes the charge injection imaging dataset, which does not change during the analysis and thus can be done once.
Checks if the noise-map is fixed (it is not if hyper functionality is on), and if it is fixed it sets the noise-normalization to the preloads for computational speed.
- Parameters:
paths – The PyAutoFit paths object which manages all paths, e.g. where the non-linear search outputs are stored, visualization and the pickled objects used by the aggregator output by this function.
model – The PyAutoFit model object, which includes model components representing the galaxies that are fitted to the imaging data.
- log_likelihood_function(instance: ModelInstance) float [source]#
Determine the fitness of a particular model
- Parameters:
instance –
- Returns:
fit – How fit the model is and the model
- Return type:
Fit
- save_attributes_for_aggregator(paths: DirectoryPaths)[source]#
Before the model-fit via the non-linear search begins, this routine saves attributes of the Analysis object to the pickles folder such that they can be loaded after the analysis using PyAutoFit’s database and aggregator tools.
For this analysis the following are output:
The 2D charge injection dataset.
The clocker used for modeling / clocking CTI.
The settings used for modeling / clocking CTI.
The full 1D dataset (e.g. unmasked, used for visualizariton).
It is common for these attributes to be loaded by many of the template aggregator functions given in the aggregator modules. For example, when using the database tools to reperform a fit, this will by default load the dataset, settings and other attributes necessary to perform a fit using the attributes output by this function.
- Parameters:
paths – The PyAutoFit paths object which manages all paths, e.g. where the non-linear search outputs are stored, visualization,and the pickled objects used by the aggregator output by this function.