Skip to content

Commit 7d9df43

Browse files
committed
Fix a bug from a previous version of code in this PR
1 parent 934b5de commit 7d9df43

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

jwst/resample/resample.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -652,10 +652,10 @@ def _get_boundary_points(xmin, xmax, ymin, ymax, dx=None, dy=None, shrink=0):
652652
sx = max(1, int(np.ceil(nx / dx)))
653653
sy = max(1, int(np.ceil(ny / dy)))
654654

655-
xmin = shrink
656-
xmax = nx - 1 - shrink
657-
ymin = shrink
658-
ymax = ny - 1 - shrink
655+
xmin += shrink
656+
xmax -= shrink
657+
ymin += shrink
658+
ymax -= shrink
659659

660660
size = 2 * sx + 2 * sy + 1
661661
x = np.empty(size)
@@ -703,8 +703,8 @@ def _compute_image_pixel_area(wcs):
703703
xmax=xmax,
704704
ymin=ymin,
705705
ymax=ymax,
706-
dx=min(nx // 4, 15),
707-
dy=min(ny // 4, 15),
706+
dx=min((xmax - xmin) // 4, 15),
707+
dy=min((ymax - ymin) // 4, 15),
708708
shrink=shrink
709709
)
710710
except ValueError:

0 commit comments

Comments
 (0)