Skip to content

Commit

Permalink
Also one the other direction
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed Dec 7, 2024
1 parent 5593bf1 commit c17a24b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions galsim/gsobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,7 @@ def _setup_image(self, image, nx, ny, bounds, add_to_image, dtype, center, odd=F
"Must set either both or neither of nx, ny", nx=nx, ny=ny)
image = Image(nx, ny, dtype=dtype)
if center is not None:
# Note: this needs to match the corresponding calculation in _get_new_bounds
image.shift(_PositionI(np.floor(center.x+0.5-image.true_center.x),
np.floor(center.y+0.5-image.true_center.y)))
else:
Expand Down

0 comments on commit c17a24b

Please sign in to comment.