autolens.AnalysisPoint#

class AnalysisPoint[source]#

Bases: Analysis, AnalysisLensing

The analysis performed for model-fitting a point-source dataset, for example fitting the point-sources of a multiply imaged lensed quasar or supernovae of many source galaxies of a galaxy cluster.

The analysis brings together the data, model and non-linear search in the classes log_likelihood_function, which is called by every iteration of the non-linear search to compute a likelihood value which samples parameter space.

Parameters:
  • point_dict (PointDict) – A dictionary containing the full point source dictionary that is used for model-fitting.

  • solver (PointSolver) – The object which is used to determine the image-plane of source-plane positions of a model (via a Tracer).

  • dataset – The imaging of the point-source dataset, which is not used for model-fitting but can be used for visualization.

  • cosmology (LensingCosmology) – The cosmology of the ray-tracing calculation.

Methods

fit_from

rtype:

FitPointDict

galaxies_via_instance_from

Create a list of galaxies from a model instance, which is used to fit the dataset.

log_likelihood_function

Determine the fit of the strong lens system of lens galaxies and source galaxies to the point source data.

log_likelihood_positions_overwrite_from

Call the positions overwrite log likelihood function, which add a penalty term to the likelihood if the positions of the multiple images of the lensed source do not trace close to one another in the source plane.

make_result

modify_after_fit

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

modify_before_fit

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

modify_model

output_profiling_info

Output the log likelihood function profiling information to hard-disk as a json file.

profile_log_likelihood_function

This function is optionally called throughout a model-fit to profile the log likelihood function.

save_attributes

save_latent_variables

Save latent variables that are computed during the analysis.

save_results

save_results_combined

should_visualize

Whether a visualize method should be called perform visualization, which depends on the following:

sky_via_instance_from

Create a sky from a model instance, which is used to fit the dataset.

tracer_via_instance_from

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

visualize

visualize_before_fit

visualize_before_fit_combined

visualize_combined

with_model

Associate an explicit model with this analysis.

Attributes

latent_variables

Custom quantities that are computed during the analysis.

log_likelihood_function(instance)[source]#

Determine the fit of the strong lens system of lens galaxies and source galaxies to the point source data.

Parameters:

instance – A model instance with attributes

Returns:

fit – A fractional value indicating how well this model fit and the model masked_dataset itself

Return type:

Fit