Skip to content

Commit 1bf4a5d

Browse files
committed
fix: bool conversion in pos comp
1 parent 7d176a7 commit 1bf4a5d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

jax_galsim/gsobject.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,12 +1057,12 @@ def drawKImage(
10571057
)
10581058

10591059
# Can't both recenter a provided image and add to it.
1060-
if recenter and image.center != PositionI(0, 0) and add_to_image:
1061-
raise _galsim.GalSimIncompatibleValuesError(
1060+
if recenter and add_to_image:
1061+
zp = PositionI(0, 0)
1062+
equinox.error_if(
1063+
zp.x,
1064+
image.center != zp,
10621065
"Cannot use add_to_image=True unless image is centered at (0,0) or recenter=False",
1063-
recenter=recenter,
1064-
image=image,
1065-
add_to_image=add_to_image,
10661066
)
10671067

10681068
# Set the center to 0,0 if appropriate

0 commit comments

Comments
 (0)