diff --git a/galsim/gsobject.py b/galsim/gsobject.py index ca275a0a3b..3f17dc4bbe 100644 --- a/galsim/gsobject.py +++ b/galsim/gsobject.py @@ -1225,6 +1225,8 @@ def _get_new_bounds(self, image, nx, ny, bounds, center): elif nx is not None and ny is not None: b = BoundsI(1,nx,1,ny) if center is not None: + # Note: this needs to match the corresponding calculation in _setup_image + # where we shift the image center after making a new image with nx,ny. b = b.shift(_PositionI(np.floor(center.x+0.5-b.true_center.x), np.floor(center.y+0.5-b.true_center.y))) return b