From c17a24b301310e37676bdb172e7097b5f748934f Mon Sep 17 00:00:00 2001 From: Mike Jarvis Date: Sat, 7 Dec 2024 12:43:05 -0500 Subject: [PATCH] Also one the other direction (#1322) --- galsim/gsobject.py | 1 + 1 file changed, 1 insertion(+) diff --git a/galsim/gsobject.py b/galsim/gsobject.py index 3f17dc4bbe..4be5872097 100644 --- a/galsim/gsobject.py +++ b/galsim/gsobject.py @@ -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: