Skip to content

Commit 035e290

Browse files
Jammy2211Jammy2211
authored andcommitted
fix interfeometer simulations
1 parent 8e98dcf commit 035e290

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

autoarray/dataset/interferometer/dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,11 @@ def dirty_signal_to_noise_map(self):
253253
@property
254254
def signal_to_noise_map(self):
255255
signal_to_noise_map_real = np.divide(
256-
np.real(self.data), np.real(self.noise_map)
256+
np.real(self.data.array), np.real(self.noise_map.array)
257257
)
258258
signal_to_noise_map_real[signal_to_noise_map_real < 0] = 0.0
259259
signal_to_noise_map_imag = np.divide(
260-
np.imag(self.data), np.imag(self.noise_map)
260+
np.imag(self.data.array), np.imag(self.noise_map.array)
261261
)
262262
signal_to_noise_map_imag[signal_to_noise_map_imag < 0] = 0.0
263263

autoarray/structures/visibilities.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ def mask(self):
8585

8686
@cached_property
8787
def amplitudes(self) -> np.ndarray:
88-
return np.sqrt(np.square(self.real) + np.square(self.imag))
88+
return np.sqrt(np.square(self.array.real) + np.square(self.array.imag))
8989

9090
@cached_property
9191
def phases(self) -> np.ndarray:
92-
return np.arctan2(self.imag, self.real)
92+
return np.arctan2(self.array.imag, self.array.real)
9393

9494
def output_to_fits(self, file_path: Union[Path, str], overwrite: bool = False):
9595
"""
@@ -113,14 +113,14 @@ def scaled_maxima(self) -> Tuple[float, float]:
113113
"""
114114
The maximum values of the visibilities if they are treated as a 2D grid in the complex plane.
115115
"""
116-
return np.max(self.real), np.max(self.imag)
116+
return np.max(self.array.real), np.max(self.array.imag)
117117

118118
@property
119119
def scaled_minima(self) -> Tuple[float, float]:
120120
"""
121121
The minimum values of the visibilities if they are treated as a 2D grid in the complex plane.
122122
"""
123-
return np.min(self.real), np.min(self.imag)
123+
return np.min(self.array.real), np.min(self.array.imag)
124124

125125

126126
class Visibilities(AbstractVisibilities):

0 commit comments

Comments
 (0)