Skip to content

Commit a05ccb0

Browse files
committed
change dimensional subsetting to operate on low-level wcs
1 parent 6184625 commit a05ccb0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

reproject/mosaicking/coadd.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,9 @@ def reproject_and_coadd(
186186
xc = np.array([-0.5, nx - 0.5, nx - 0.5, -0.5])
187187
yc = np.array([-0.5, -0.5, ny - 0.5, ny - 0.5])
188188
zc = np.array([-0.5, nz - 0.5])
189-
xc_out, yc_out = wcs_out.celestial.world_to_pixel(wcs_in.celestial.pixel_to_world(xc, yc))
190-
zc_out = wcs_out.spectral.world_to_pixel(wcs_in.spectral.pixel_to_world(zc))
189+
# TODO: figure out what to do here if the low_level_wcs doesn't support subsetting
190+
xc_out, yc_out = wcs_out.low_level_wcs.celestial.world_to_pixel(wcs_in.celestial.pixel_to_world(xc, yc))
191+
zc_out = wcs_out.low_level_wcs.spectral.world_to_pixel(wcs_in.spectral.pixel_to_world(zc))
191192
shape_out_cel = shape_out[1:]
192193

193194
# Determine the cutout parameters

0 commit comments

Comments
 (0)