Skip to content

Commit c428439

Browse files
Jammy2211Jammy2211
authored andcommitted
put safe guard against division by 0 in arctan2
1 parent 9bda3bd commit c428439

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

autoarray/dataset/imaging/simulator.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,14 @@ def via_image_from(
138138

139139
if self.use_real_space_convolution:
140140
image = self.psf.convolved_image_via_real_space_from(
141-
image=image, blurring_image=None, xp=xp,
141+
image=image,
142+
blurring_image=None,
143+
xp=xp,
142144
)
143145
else:
144-
image = self.psf.convolved_image_from(image=image, blurring_image=None, xp=xp)
146+
image = self.psf.convolved_image_from(
147+
image=image, blurring_image=None, xp=xp
148+
)
145149

146150
image = image + background_sky_map
147151

test_autoarray/geometry/test_geometry_util.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,6 @@ def test__pixel_coordinates_2d_from():
972972
assert scaled_coordinates == (0.0, 6.0)
973973

974974

975-
976-
977975
def test__pixel_coordinates_wcs_2d_from():
978976
# -----------------------------
979977
# (2,2) grid: centre is (1.5, 1.5) in WCS pixels

0 commit comments

Comments
 (0)