autolens.AnalysisInterferometer#

class autolens.AnalysisInterferometer(dataset, positions: Optional[autoarray.structures.grids.irregular_2d.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: Optional[autoarray.inversion.pixelizations.settings.SettingsPixelization] = None, settings_inversion: Optional[autoarray.inversion.inversion.settings.SettingsInversion] = None, settings_lens: Optional[autolens.analysis.settings.SettingsLens] = None)[source]#
__init__(dataset, positions: Optional[autoarray.structures.grids.irregular_2d.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: Optional[autoarray.inversion.pixelizations.settings.SettingsPixelization] = None, settings_inversion: Optional[autoarray.inversion.inversion.settings.SettingsInversion] = None, settings_lens: Optional[autolens.analysis.settings.SettingsLens] = None)[source]#

Analysis classes are used by PyAutoFit to fit a model to a dataset via a non-linear search.

An Analysis class defines the log_likelihood_function which fits the model to the dataset and returns the log likelihood value defining how well the model fitted the data. The Analysis class handles many other tasks, such as visualization, outputting results to hard-disk and storing results in a format that can be loaded after the model-fit is complete using PyAutoFit’s database tools.

This Analysis class is used for all model-fits which fit galaxies (or objects containing galaxies like a Tracer) to an interferometer dataset.

This class stores the settings used to perform the model-fit for certain components of the model (e.g. a pixelization or inversion), the Cosmology used for the analysis and hyper datasets used for certain model classes.

Parameters
  • dataset – The interferometer dataset that the model is fitted too.

  • hyper_dataset_result – The hyper-model image and hyper galaxies images of a previous result in a model-fitting pipeline, which are used by certain classes for adapting the analysis to the properties of the dataset.

  • cosmology – The Cosmology assumed for this analysis.

  • settings_pixelization – settings controlling how a pixelization is fitted for example if a border is used when creating the pixelization.

  • settings_inversion – Settings controlling how an inversion is fitted, for example which linear algebra formalism is used.

  • settings_lens – Settings controlling the lens calculation, for example how close the lensed source’s multiple images have to trace within one another in the source plane for the model to not be discarded.

Methods

__init__(dataset[, positions, …])

Analysis classes are used by PyAutoFit to fit a model to a dataset via a non-linear search.

check_and_replace_hyper_images(paths)

Using a the result of a previous model-fit, a hyper-dataset can be set up which adapts aspects of the model (e.g.

fit_interferometer_via_instance_from(instance)

Given a model instance create a FitInterferometer object.

fit_interferometer_via_tracer_from(tracer, …)

Given a Tracer, which the analysis constructs from a model instance, create a FitInterferometer object.

hyper_background_noise_via_instance_from(…)

If the model instance contains a HyperBackgroundNoise attribute, which adds a free parameter to the model that scales the background noise, return this attribute.

hyper_image_sky_via_instance_from(instance)

If the model instance contains a HyperImageSky attribute, which adds a free parameter to the model that scales the background sky, return this attribute.

instance_with_associated_hyper_images_from(…)

Using the model image and galaxy images that were set up as the hyper dataset, associate the galaxy images of that result with the galaxies in this model fit.

instance_with_associated_hyper_visibilities_from(…)

Using the model visibilities that were set up as the hyper dataset, associate the galaxy images of that result with the galaxies in this model fit.

log_likelihood_cap_from(…)

Certain Inversion’s have stochasticity in their log likelihood estimate (e.g.

log_likelihood_function(instance)

Given an instance of the model, where the model parameters are set via a non-linear search, fit the model instance to the interferometer dataset.

make_result(samples, model, search)

After the non-linear search is complete create its Result, which includes:

modify_after_fit(paths, model, result)

Call functions that perform tasks after a model-fit is completed, for example ensuring the figure of merit has not changed from previous estimates and resetting preloads.

modify_before_fit(paths, model)

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(model)

output_or_check_figure_of_merit_sanity(…)

Changes to the PyAutoGalaxy source code may inadvertantly change the numerics of how a log likelihood is computed.

plane_via_instance_from(instance)

Create a Plane from the galaxies contained in a model instance.

profile_log_likelihood_function(paths, instance)

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)

Before the non-linear search begins, this routine saves attributes of the Analysis object to the pickles

save_results_for_aggregator(paths, samples, …)

At the end of a model-fit, 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_stochastic_outputs(paths, samples)

Certain Inversion’s have stochasticity in their log likelihood estimate (e.g.

set_hyper_dataset(result)

Using a the result of a previous model-fit, set the hyper-dataset for this analysis.

set_preloads(paths, model)

It is common for the model to have components whose parameters are all fixed, and thus the way that component fits the data does not change.

stochastic_log_likelihoods_via_instance_from(…)

Certain Inversion’s have stochasticity in their log likelihood estimate.

tracer_via_instance_from(instance[, …])

Create a Tracer from the galaxies contained in a model instance.

visualize(paths, instance, during_analysis)

Outputs images of the maximum log likelihood model inferred by the model-fit.

with_model(model)

Associate an explicit model with this analysis.

Attributes

fit_func

fit_maker_cls

interferometer

no_positions

preloads_cls