|
| 1 | +""" |
| 2 | +Fit an imaging (CCD) dataset with a model consisting of one or more galaxies. |
| 3 | +
|
| 4 | +`FitImaging` is the central object in a **PyAutoGalaxy** imaging analysis. It: |
| 5 | +
|
| 6 | +1. Computes the summed image of all non-linear (standard) galaxy light profiles. |
| 7 | +2. Convolves that image with the PSF to create the ``blurred_image``. |
| 8 | +3. Subtracts the blurred image from the data to create the ``profile_subtracted_image``. |
| 9 | +4. If linear light profiles or a pixelization are present, fits the residual image via a linear |
| 10 | + inversion (see `autogalaxy.galaxy.to_inversion`). |
| 11 | +5. Combines the blurred image and inversion reconstruction into the ``model_data``. |
| 12 | +6. Computes residuals, chi-squared, log-likelihood (or log-evidence when an inversion is used). |
| 13 | +
|
| 14 | +When fitting a model via `AnalysisImaging`, the `figure_of_merit` property of `FitImaging` is |
| 15 | +evaluated inside `log_likelihood_function` and returned to the non-linear search. |
| 16 | +""" |
1 | 17 | import numpy as np |
2 | 18 | from typing import Dict, List, Optional |
3 | 19 |
|
@@ -116,6 +132,13 @@ def profile_subtracted_image(self) -> aa.Array2D: |
116 | 132 |
|
117 | 133 | @property |
118 | 134 | def galaxies_to_inversion(self) -> GalaxiesToInversion: |
| 135 | + """ |
| 136 | + Returns a `GalaxiesToInversion` object that converts the galaxies containing linear light profiles or |
| 137 | + pixelizations into the inversion objects required for the linear algebra solve. |
| 138 | +
|
| 139 | + The dataset passed to this object is the ``profile_subtracted_image`` — the imaging data with all |
| 140 | + standard (non-linear) light profile images subtracted — so the inversion only fits the residual signal. |
| 141 | + """ |
119 | 142 | dataset = aa.DatasetInterface( |
120 | 143 | data=self.profile_subtracted_image, |
121 | 144 | noise_map=self.noise_map, |
|
0 commit comments