Skip to content

Commit

Permalink
fix interferometer adapt_images
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Feb 1, 2024
1 parent f62c958 commit e8ce0b4
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions autolens/interferometer/model/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import autoarray as aa
import autogalaxy as ag

from autogalaxy.analysis.adapt_images import AdaptImages
from autolens.lens.ray_tracing import Tracer
from autolens.interferometer.fit_interferometer import FitInterferometer
from autolens.analysis.result import ResultDataset
Expand Down Expand Up @@ -67,3 +68,29 @@ def real_space_mask(self) -> aa.Mask2D:
The real space mask used by this model-fit.
"""
return self.max_log_likelihood_fit.dataset.real_space_mask

def adapt_images_from(self, use_model_images : bool = False) -> AdaptImages:
"""
Returns the adapt-images which are used to make a pixelization's mesh and regularization adapt to the
reconstructed galaxy's morphology.
This can use either:
- The model image of each galaxy in the best-fit model.
- The subtracted image of each galaxy in the best-fit model, where the subtracted image is the dataset
minus the model images of all other galaxies.
In **PyAutoLens** these adapt images have had lensing calculations performed on them and therefore for source
galaxies are their lensed model images in the image-plane.
Parameters
----------
use_model_images
If True, the model images of the galaxies are used to create the adapt images. If False, the subtracted
images of the galaxies are used.
"""

return AdaptImages.from_result(
result=self,
use_model_images=True
)

0 comments on commit e8ce0b4

Please sign in to comment.