From 5a8e8cb590e26a63c2adcd36ef8fef54366e62d4 Mon Sep 17 00:00:00 2001 From: "Thomson, Alec (CASS, Kensington)" Date: Sun, 12 May 2024 17:55:48 +1000 Subject: [PATCH] Use celestial --- arrakis/cutout.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arrakis/cutout.py b/arrakis/cutout.py index 02910db6..aab09151 100644 --- a/arrakis/cutout.py +++ b/arrakis/cutout.py @@ -160,10 +160,10 @@ def cutout_image( top_left_off = top_left.spherical_offsets_by(d_lon=-padder, d_lat=padder) bottom_right_off = bottom_right.spherical_offsets_by(d_lon=padder, d_lat=-padder) - x_left, y_bottom = skycoord_to_pixel(bottom_left_off, cube.wcs) - x_right, y_top = skycoord_to_pixel(top_right_off, cube.wcs) - _x_left, _y_top = skycoord_to_pixel(top_left_off, cube.wcs) - _x_right, _y_bottom = skycoord_to_pixel(bottom_right_off, cube.wcs) + x_left, y_bottom = skycoord_to_pixel(bottom_left_off, cube.wcs.celestial) + x_right, y_top = skycoord_to_pixel(top_right_off, cube.wcs.celestial) + _x_left, _y_top = skycoord_to_pixel(top_left_off, cube.wcs.celestial) + _x_right, _y_bottom = skycoord_to_pixel(bottom_right_off, cube.wcs.celestial) # Compare all points in case of insanity at the poles yp_lo_idx = int(np.floor(min(y_bottom, _y_bottom, y_top, _y_top)))