# autolens.AnalysisImaging¶

class autolens.AnalysisImaging(dataset, positions: autoarray.structures.grids.two_d.grid_2d_irregular.Grid2DIrregular = None, hyper_dataset_result=None, cosmology=FlatLambdaCDM(name="Planck15", H0=67.7 km / (Mpc s), Om0=0.307, Tcmb0=2.725 K, Neff=3.05, m_nu=[0. 0. 0.06] eV, Ob0=0.0486), settings_pixelization=<autoarray.inversion.pixelizations.settings.SettingsPixelization object>, settings_inversion=<autoarray.inversion.inversion.settings.SettingsInversion object>, settings_lens=<autolens.lens.model.settings.SettingsLens object>)
__init__(dataset, positions: autoarray.structures.grids.two_d.grid_2d_irregular.Grid2DIrregular = None, hyper_dataset_result=None, cosmology=FlatLambdaCDM(name="Planck15", H0=67.7 km / (Mpc s), Om0=0.307, Tcmb0=2.725 K, Neff=3.05, m_nu=[0. 0. 0.06] eV, Ob0=0.0486), settings_pixelization=<autoarray.inversion.pixelizations.settings.SettingsPixelization object>, settings_inversion=<autoarray.inversion.inversion.settings.SettingsInversion object>, settings_lens=<autolens.lens.model.settings.SettingsLens object>)
Parameters: dataset – positions (aa.Grid2DIrregular) – Image-pixel coordinates in arc-seconds of bright regions of the lensed source that will map close to one another in the source-plane(s) for an accurate mass model, which can be used to discard unphysical mass models during model-fitting. cosmology – settings_pixelization – settings_inversion – settings_lens – preloads –

Methods

__init__(dataset, positions[, …])
associate_hyper_images(instance) Takes images from the last result, if there is one, and associates them with galaxies in this search where full-path galaxy names match.
check_and_replace_hyper_images(paths)
fit_imaging_for_instance(instance[, …])
fit_imaging_for_tracer(tracer, …[, …])
hyper_background_noise_for_instance(instance)
hyper_image_sky_for_instance(instance)
log_likelihood_cap_from(…)
log_likelihood_function(instance) Determine the fit of a lens galaxy and source galaxy to the imaging in this lens.
make_result(samples, model, search)
modify_after_fit(paths, model, result) Overwrite this method to modify the attributes of the Analysis class before the non-linear search begins.
modify_before_fit(paths, model) Overwrite this method to modify the attributes of the Analysis class before the non-linear search begins.
output_or_check_figure_of_merit_sanity(…)
plane_for_instance(instance)
profile_log_likelihood_function(instance, paths) Overwrite this function for profiling of the log likelihood function to be performed every update of a non-linear search.
save_attributes_for_aggregator(paths)
save_results_for_aggregator(paths, samples, …)
save_settings(paths)
save_stochastic_outputs(paths, samples)
set_hyper_dataset(result)
set_preloads(paths, model)
stochastic_log_evidences_for_instance(instance)
tracer_for_instance(instance, …)
visualize(paths, instance, during_analysis)

Attributes

 fit_func imaging no_positions
modify_before_fit(paths: autofit.non_linear.paths.directory.DirectoryPaths, model: autofit.mapper.prior_model.abstract.AbstractPriorModel)

Overwrite this method to modify the attributes of the Analysis class before the non-linear search begins.

An example use-case is using properties of the model to alter the Analysis class in ways that can speed up the fitting performed in the log_likelihood_function.

log_likelihood_function(instance)

Determine the fit of a lens galaxy and source galaxy to the imaging in this lens.

Parameters: instance – A model instance with attributes fit – A fractional value indicating how well this model fit and the model imaging itself Fit
profile_log_likelihood_function(instance, paths: Optional[autofit.non_linear.paths.directory.DirectoryPaths] = None)

Overwrite this function for profiling of the log likelihood function to be performed every update of a non-linear search.

This behaves analogously to overwriting the visualize function of the Analysis class, whereby the user fills in the project-specific behaviour of the profiling.

Parameters: paths – An object describing the paths for saving data (e.g. hard-disk directories or entries in sqlite database). instance – The maximum likliehood instance of the model so far in the non-linear search.