11import numpy as np
22
3- from autoarray .masked import masked_data as md
3+ from autoarray .masked import masked_dataset as md
44from autoarray .util import fit_util
55
66
7- def fit (masked_data , model_data , inversion = None ):
7+ def fit (masked_dataset , model_data , inversion = None ):
88
9- if isinstance (masked_data , md .MaskedImaging ):
9+ if isinstance (masked_dataset , md .MaskedImaging ):
1010 return ImagingFit (
11- mask = masked_data .mask ,
12- image = masked_data .image ,
13- noise_map = masked_data .noise_map ,
11+ mask = masked_dataset .mask ,
12+ image = masked_dataset .image ,
13+ noise_map = masked_dataset .noise_map ,
1414 model_image = model_data ,
1515 inversion = inversion ,
1616 )
17- elif isinstance (masked_data , md .MaskedInterferometer ):
17+ elif isinstance (masked_dataset , md .MaskedInterferometer ):
1818 return InterferometerFit (
19- visibilities_mask = masked_data .visibilities_mask ,
20- visibilities = masked_data .visibilities ,
21- noise_map = masked_data .noise_map ,
19+ visibilities_mask = masked_dataset .visibilities_mask ,
20+ visibilities = masked_dataset .visibilities ,
21+ noise_map = masked_dataset .noise_map ,
2222 model_visibilities = model_data ,
2323 inversion = inversion ,
2424 )
@@ -28,7 +28,7 @@ class DataFit(object):
2828
2929 # noinspection PyUnresolvedReferences
3030 def __init__ (self , mask , data , noise_map , model_data , inversion = None ):
31- """Class to fit simulator where the data structures are any dimension.
31+ """Class to fit simulator where the dataset structures are any dimension.
3232
3333 Parameters
3434 -----------
@@ -37,7 +37,7 @@ def __init__(self, mask, data, noise_map, model_data, inversion=None):
3737 noise_map : ndarray
3838 The noise_map-map of the observed simulator.
3939 mask: msk.Mask
40- The masks that is applied to the data .
40+ The masks that is applied to the dataset .
4141 model_data : ndarray
4242 The model simulate the fitting image is fitted with.
4343
@@ -48,14 +48,14 @@ def __init__(self, mask, data, noise_map, model_data, inversion=None):
4848 chi_squared_map : ndarray
4949 The chi-squared map of the fit ((datas - model_data) / noise_maps ) **2.0
5050 chi_squared : float
51- The overall chi-squared of the model's fit to the data , summed over every simulator-point.
51+ The overall chi-squared of the model's fit to the dataset , summed over every simulator-point.
5252 reduced_chi_squared : float
5353 The reduced chi-squared of the model's fit to simulate (chi_squared / number of datas points), summed over \
5454 every simulator-point.
5555 noise_normalization : float
5656 The overall normalization term of the noise_map-map, summed over every simulator-point.
5757 likelihood : float
58- The overall likelihood of the model's fit to the data , summed over evey simulator-point.
58+ The overall likelihood of the model's fit to the dataset , summed over evey simulator-point.
5959 """
6060 self .mask = mask
6161 self .data = data
@@ -83,7 +83,7 @@ def chi_squared_map(self):
8383
8484 @property
8585 def signal_to_noise_map (self ):
86- """The signal-to-noise_map of the data and noise-map which are fitted."""
86+ """The signal-to-noise_map of the dataset and noise-map which are fitted."""
8787 signal_to_noise_map = np .divide (self .data , self .noise_map )
8888 signal_to_noise_map [signal_to_noise_map < 0 ] = 0
8989 return signal_to_noise_map
@@ -138,7 +138,7 @@ def figure_of_merit(self):
138138
139139class ImagingFit (DataFit ):
140140 def __init__ (self , mask , image , noise_map , model_image , inversion = None ):
141- """Class to fit simulator where the data structures are any dimension.
141+ """Class to fit simulator where the dataset structures are any dimension.
142142
143143 Parameters
144144 -----------
@@ -147,7 +147,7 @@ def __init__(self, mask, image, noise_map, model_image, inversion=None):
147147 noise_map : ndarray
148148 The noise_map-map of the observed simulator.
149149 mask: msk.Mask
150- The masks that is applied to the data .
150+ The masks that is applied to the dataset .
151151 model_data : ndarray
152152 The model simulate the fitting image is fitted with.
153153
@@ -158,14 +158,14 @@ def __init__(self, mask, image, noise_map, model_image, inversion=None):
158158 chi_squared_map : ndarray
159159 The chi-squared map of the fit ((datas - model_data) / noise_maps ) **2.0
160160 chi_squared : float
161- The overall chi-squared of the model's fit to the data , summed over every simulator-point.
161+ The overall chi-squared of the model's fit to the dataset , summed over every simulator-point.
162162 reduced_chi_squared : float
163163 The reduced chi-squared of the model's fit to simulate (chi_squared / number of datas points), summed over \
164164 every simulator-point.
165165 noise_normalization : float
166166 The overall normalization term of the noise_map-map, summed over every simulator-point.
167167 likelihood : float
168- The overall likelihood of the model's fit to the data , summed over evey simulator-point.
168+ The overall likelihood of the model's fit to the dataset , summed over evey simulator-point.
169169 """
170170
171171 super (ImagingFit , self ).__init__ (
@@ -194,7 +194,7 @@ def __init__(
194194 model_visibilities ,
195195 inversion = None ,
196196 ):
197- """Class to fit simulator where the data structures are any dimension.
197+ """Class to fit simulator where the dataset structures are any dimension.
198198
199199 Parameters
200200 -----------
@@ -203,7 +203,7 @@ def __init__(
203203 noise_map : ndarray
204204 The noise_map-map of the observed simulator.
205205 visibilities_mask: msk.Mask
206- The masks that is applied to the data .
206+ The masks that is applied to the dataset .
207207 model_data : ndarray
208208 The model simulate the fitting image is fitted with.
209209
@@ -214,14 +214,14 @@ def __init__(
214214 chi_squared_map : ndarray
215215 The chi-squared map of the fit ((datas - model_data) / noise_maps ) **2.0
216216 chi_squared : float
217- The overall chi-squared of the model's fit to the data , summed over every simulator-point.
217+ The overall chi-squared of the model's fit to the dataset , summed over every simulator-point.
218218 reduced_chi_squared : float
219219 The reduced chi-squared of the model's fit to simulate (chi_squared / number of datas points), summed over \
220220 every simulator-point.
221221 noise_normalization : float
222222 The overall normalization term of the noise_map-map, summed over every simulator-point.
223223 likelihood : float
224- The overall likelihood of the model's fit to the data , summed over evey simulator-point.
224+ The overall likelihood of the model's fit to the dataset , summed over evey simulator-point.
225225 """
226226
227227 super (InterferometerFit , self ).__init__ (
0 commit comments