From 5593bf19915438518160307eeaa905e1b0a0c361 Mon Sep 17 00:00:00 2001 From: Mike Jarvis Date: Sat, 7 Dec 2024 12:39:44 -0500 Subject: [PATCH] Add inline comment about lines that need to match shift calculation (#1322) --- galsim/gsobject.py | 2 ++ 1 file changed, 2 insertions(+) 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