Skip to content

Commit 354fed2

Browse files
Jammy2211Jammy2211
authored andcommitted
undo border changes
1 parent c19dd09 commit 354fed2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

autoarray/inversion/pixelization/border_relocator.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,10 @@ def relocated_grid_via_ellipse_border_from(grid, origin, a, b, phi, xp=np, eps=1
296296
yprime = -s * dx + c * dy
297297

298298
# ellipse radius in normalized coords
299-
300299
q = (xprime / a) ** 2 + (yprime / b) ** 2
301-
q = xp.where(xp.isfinite(q), q, 1.0)
300+
302301
outside = q > 1.0
303-
q = xp.where(xp.isfinite(q), q, 1.0)
304-
scale = 1.0 / xp.sqrt(xp.maximum(q, 1.0))
305-
scale = xp.minimum(scale, 1.0)
302+
scale = 1.0 / xp.sqrt(xp.maximum(q, 1.0 + eps))
306303

307304
# scale back to boundary
308305
xprime2 = xprime * scale

0 commit comments

Comments
 (0)