Skip to content

Commit

Permalink
undo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Dec 16, 2024
1 parent 6f01e62 commit 3806cb7
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions autoarray/dataset/imaging/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,6 @@ def apply_noise_scaling(
noise_value: float = 1e8,
signal_to_noise_value: Optional[float] = None,
should_zero_data: bool = True,
data_noise_mean : Optional[float] = None,
data_noise_sigma : Optional[float] = None
) -> "Imaging":
"""
Apply a mask to the imaging dataset using noise scaling, whereby the maskmay zero the data and increase
Expand Down Expand Up @@ -396,14 +394,8 @@ def apply_noise_scaling(
self.noise_map.native,
)

if should_zero_data and data_noise_sigma is None:
if should_zero_data:
data = np.where(np.invert(mask), 0.0, self.data.native)
elif data_noise_sigma is not None:
random_noise = np.random.normal(
loc=data_noise_mean, scale=data_noise_sigma, size=self.data.shape_native
)
data = np.where(mask_2d, random_noise, data.native)

else:
data = self.data.native

Expand Down

0 comments on commit 3806cb7

Please sign in to comment.