@@ -24,15 +24,10 @@ def __init__(
2424
2525 Parameters
2626 ----------
27- dataset : MaskedInterferometer
28- The masked interferometer dataset that is fitted.
27+ dataset
28+ The interferometer dataset that is fitted, containing the observed visibilities and noise-map .
2929 dataset_model
3030 Attributes which allow for parts of a dataset to be treated as a model (e.g. the background sky level).
31- model_data : Visibilities
32- The model visibilities the masked imaging is fitted with.
33- inversion : Inversion
34- If the fit uses an `Inversion` this is the instance of the object used to perform the fit. This determines
35- if the `log_likelihood` or `log_evidence` is used as the `figure_of_merit`.
3631 use_mask_in_fit
3732 If `True`, masked data points are omitted from the fit. If `False` they are not (in most use cases the
3833 `dataset` will have been processed to remove masked points, for example the `slim` representation).
@@ -51,7 +46,7 @@ def __init__(
5146 noise_normalization
5247 The overall normalization term of the noise_map, summed over every data point.
5348 log_likelihood
54- The overall log likelihood of the model's fit to the dataset, summed over evey data point.
49+ The overall log likelihood of the model's fit to the dataset, summed over every data point.
5550 """
5651
5752 super ().__init__ (
@@ -63,10 +58,22 @@ def __init__(
6358
6459 @property
6560 def mask (self ) -> np .ndarray :
61+ """
62+ The mask of the interferometer fit, returned as an all-`False` array matching the shape of the visibility data.
63+
64+ Interferometer data is not spatially masked in the same way as imaging data — all visibility measurements
65+ are included in the fit — so this always returns an unmasked array.
66+ """
6667 return np .full (shape = self .data .shape , fill_value = False )
6768
6869 @property
6970 def transformer (self ) -> ty .Transformer :
71+ """
72+ The Fourier transformer used to map between image space and visibility (uv-plane) space.
73+
74+ This is taken directly from the interferometer dataset and is used internally to compute the
75+ `dirty_*` image-space representations of the fit quantities.
76+ """
7077 return self .dataset .transformer
7178
7279 @property
@@ -135,19 +142,9 @@ def log_evidence(self) -> float:
135142 Log Evidence = -0.5*[Chi_Squared_Term + Regularization_Term + Log(Covariance_Regularization_Term) -
136143 Log(Regularization_Matrix_Term) + Noise_Term]
137144
138- Parameters
139- ----------
140- chi_squared
141- The chi-squared term of the inversion's fit to the data.
142- regularization_term
143- The regularization term of the inversion, which is the sum of the difference between reconstructed \
144- flux of every pixel multiplied by the regularization coefficient.
145- log_curvature_regularization_term
146- The log of the determinant of the sum of the curvature and regularization matrices.
147- log_regularization_term
148- The log of the determinant o the regularization matrix.
149- noise_normalization
150- The normalization noise_map-term for the data's noise-map.
145+ For interferometer fits the chi-squared uses the fast inversion chi-squared (`inversion.fast_chi_squared`).
146+
147+ Returns `None` if no inversion is present, in which case `log_likelihood` is used as the figure of merit.
151148 """
152149 if self .inversion is not None :
153150 return fit_util .log_evidence_from (
@@ -160,28 +157,56 @@ def log_evidence(self) -> float:
160157
161158 @property
162159 def dirty_image (self ) -> Array2D :
160+ """
161+ The dirty image of the observed visibility data, computed by applying the inverse Fourier transform to the
162+ data visibilities. This is the image-space representation of the observed data before any deconvolution.
163+ """
163164 return self .transformer .image_from (visibilities = self .data )
164165
165166 @property
166167 def dirty_noise_map (self ) -> Array2D :
168+ """
169+ The dirty noise-map, computed by applying the inverse Fourier transform to the noise-map visibilities.
170+ This gives an image-space representation of the noise level across the field of view.
171+ """
167172 return self .transformer .image_from (visibilities = self .noise_map )
168173
169174 @property
170175 def dirty_signal_to_noise_map (self ) -> Array2D :
176+ """
177+ The dirty signal-to-noise map, computed by applying the inverse Fourier transform to the signal-to-noise
178+ visibilities. This gives an image-space representation of the signal-to-noise ratio across the field of view.
179+ """
171180 return self .transformer .image_from (visibilities = self .signal_to_noise_map )
172181
173182 @property
174183 def dirty_model_image (self ) -> Array2D :
184+ """
185+ The dirty model image, computed by applying the inverse Fourier transform to the model data visibilities.
186+ This is the image-space representation of the model before any deconvolution.
187+ """
175188 return self .transformer .image_from (visibilities = self .model_data )
176189
177190 @property
178191 def dirty_residual_map (self ) -> Array2D :
192+ """
193+ The dirty residual map, computed by applying the inverse Fourier transform to the residual-map visibilities
194+ (data - model_data). This is the image-space representation of the residuals.
195+ """
179196 return self .transformer .image_from (visibilities = self .residual_map )
180197
181198 @property
182199 def dirty_normalized_residual_map (self ) -> Array2D :
200+ """
201+ The dirty normalized residual map, computed by applying the inverse Fourier transform to the
202+ normalized residual-map visibilities ((data - model_data) / noise_map).
203+ """
183204 return self .transformer .image_from (visibilities = self .normalized_residual_map )
184205
185206 @property
186207 def dirty_chi_squared_map (self ) -> Array2D :
208+ """
209+ The dirty chi-squared map, computed by applying the inverse Fourier transform to the chi-squared-map
210+ visibilities (((data - model_data) / noise_map) ** 2.0).
211+ """
187212 return self .transformer .image_from (visibilities = self .chi_squared_map )
0 commit comments