autolens.FitInterferometer#

class autolens.FitInterferometer(dataset: ~autoarray.dataset.interferometer.interferometer.Interferometer, tracer: ~autolens.lens.ray_tracing.Tracer, hyper_background_noise: ~typing.Optional[~autogalaxy.hyper.hyper_data.HyperBackgroundNoise] = None, use_hyper_scaling: bool = True, settings_pixelization: ~autoarray.inversion.pixelization.settings.SettingsPixelization = <autoarray.inversion.pixelization.settings.SettingsPixelization object>, settings_inversion: ~autoarray.inversion.inversion.settings.SettingsInversion = <autoarray.inversion.inversion.settings.SettingsInversion object>, preloads: ~autolens.analysis.preloads.Preloads = <autolens.analysis.preloads.Preloads object>, profiling_dict: ~typing.Optional[~typing.Dict] = None)[source]#
__init__(dataset: ~autoarray.dataset.interferometer.interferometer.Interferometer, tracer: ~autolens.lens.ray_tracing.Tracer, hyper_background_noise: ~typing.Optional[~autogalaxy.hyper.hyper_data.HyperBackgroundNoise] = None, use_hyper_scaling: bool = True, settings_pixelization: ~autoarray.inversion.pixelization.settings.SettingsPixelization = <autoarray.inversion.pixelization.settings.SettingsPixelization object>, settings_inversion: ~autoarray.inversion.inversion.settings.SettingsInversion = <autoarray.inversion.inversion.settings.SettingsInversion object>, preloads: ~autolens.analysis.preloads.Preloads = <autolens.analysis.preloads.Preloads object>, profiling_dict: ~typing.Optional[~typing.Dict] = None)[source]#

Fits an interferometer dataset using a Tracer object.

The fit performs the following steps:

  1. Compute the sum of all images of galaxy light profiles in the Tracer.

2) Fourier transform this image with the transformer object and uv_wavelengths to create the profile_visibilities.

  1. Subtract these visibilities from the data to create the profile_subtracted_visibilities.

4) If the Tracer has any linear algebra objects (e.g. linear light profiles, a pixelization / regulariation) fit the profile_subtracted_visibilities with these objects via an inversion.

5) Compute the model_data as the sum of the profile_visibilities and reconstructed_data of the inversion (if an inversion is not performed the model_data is only the profile_visibilities.

6) Subtract the model_data from the data and compute the residuals, chi-squared and likelihood via the noise-map (if an inversion is performed the log_evidence, including addition terms describing the linear algebra solution, is computed).

When performing a model-fit` via ` AnalysisInterferometer` object the figure_of_merit of this FitInterferometer object is called and returned in the log_likelihood_function.

Parameters
  • dataset – The interforometer dataset which is fitted by the galaxies in the tracer.

  • tracer – The tracer of galaxies whose light profile images are used to fit the interferometer data.

  • hyper_background_noise – If included, adds a noise-scaling term to the background noise.

  • use_hyper_scaling – If set to False, the hyper scaling functions (e.g. the hyper_background_noise) are omitted irrespective of their inputs.

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

  • preloads – Contains preloaded calculations (e.g. linear algebra matrices) which can skip certain calculations in the fit.

  • profiling_dict – A dictionary which if passed to the fit records how long fucntion calls which have the profile_func decorator take to run.

Methods

__init__(dataset, tracer[, ...])

Fits an interferometer dataset using a Tracer object.

galaxy_linear_obj_data_dict_from([use_image])

Returns a dictionary mapping every galaxy containing a linear object (e.g.

refit_with_new_preloads(preloads[, ...])

Returns a new fit which uses the dataset, tracer and other objects of this fit, but uses a different set of preloads input into this function.

Attributes

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:

data

dirty_chi_squared_map

dirty_image

dirty_model_image

dirty_noise_map

dirty_normalized_residual_map

dirty_residual_map

dirty_signal_to_noise_map

figure_of_merit

galaxy_model_image_dict

A dictionary which associates every galaxy in the tracer with its image.

galaxy_model_visibilities_dict

A dictionary which associates every galaxy in the tracer with its model visibilities.

grid

interferometer

inversion

A property that is only computed once per instance and then replaces itself with an ordinary attribute.

linear_light_profile_intensity_dict

When linear light profiles are used in an inversion, their intensity parameter values are solved for via linear algebra.

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

Returns the model data that is used to fit the data.

model_obj_linear_light_profiles_to_light_profiles

The model object may contain linear light profiles, which solve for the intensity during the Inversion.

model_visibilities

model_visibilities_of_planes_list

A list of every model image of every plane in the tracer.

noise_map

Returns the interferometer's noise-map, which may have a hyper scaling performed which increase the noise in regions of the data that are poorly fitted in order to avoid overfitting.

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:

perform_inversion

Returns a bool specifying whether this fit object performs an inversion.

potential_chi_squared_map

The signal-to-noise_map of the dataset and noise-map which are fitted.

profile_subtracted_visibilities

Returns the interferometer dataset's visibilities with all transformed light profile images in the fit's tracer subtracted.

profile_visibilities

Returns the visibilities of every light profile in the tracer, which are computed by performing a Fourier transform to the sum of light profile images.

reduced_chi_squared

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.

total_mappers

The total number of Mapper objects used by the inversion in this fit.

tracer_linear_light_profiles_to_light_profiles

The Tracer where all linear light profiles have been converted to ordinary light profiles, where their intensity values are set to the values inferred by this fit.

tracer_to_inversion

transformer

visibilities

w_tilde

Only call the w_tilde property of a dataset used to perform efficient linear algebra calcualtions if the SettingsInversion()` object has use_w_tilde=True, to avoid unnecessary computation.