Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Jun 6, 2023
1 parent c04855e commit 771190d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions autogalaxy/analysis/model_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,33 @@ def adapt_fit(
analysis,
search_previous,
):
"""
Perform a adapt-fit, which extends a model-fit with an additional fit which fixes the non-pixelization components of the
model (e.g., `LightProfile`'s, `MassProfile`) to the `Result`'s maximum likelihood fit. The adapt-fit then treats
only the adaptive pixelization's components as free parameters, which are any of the following model components:
1) The `Pixelization` of any `Galaxy` in the model.
2) The `Regularization` of any `Galaxy` in the model.
The adapt model is typically used in pipelines to refine and improve an `Inversion` after model-fits that fit the
`Galaxy` light and mass components.
Parameters
----------
setup_adapt
The setup of the adapt fit.
result
The result of a previous `Analysis` search whose maximum log likelihood model forms the basis of the adapt model.
analysis
An analysis which is used to fit imaging or interferometer data with a model.
Returns
-------
af.Result
The result of the adapt model-fit, which has a new attribute `result.adapt` that contains updated parameter
values for the adaptive pixelization's components for passing to later model-fits.
"""

if analysis.adapt_model_image is None:
raise exc.AnalysisException(
"The analysis class does not have a adapt_model_image attribute, which is required for adapt fitting."
Expand Down

0 comments on commit 771190d

Please sign in to comment.