From b864ba5d4109912502b515deecad0e2b7db33500 Mon Sep 17 00:00:00 2001 From: Ben Cassese Date: Sat, 21 Feb 2026 23:16:11 -0500 Subject: [PATCH 1/2] swap axis order in wcs for predicted sectors --- src/tesswcs/tesswcs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tesswcs/tesswcs.py b/src/tesswcs/tesswcs.py index 3601b2f..cf9af84 100644 --- a/src/tesswcs/tesswcs.py +++ b/src/tesswcs/tesswcs.py @@ -55,7 +55,6 @@ def from_sector(cls, sector: int, camera: int, ccd: int): wcs.ra = cls.wcs_dicts[sector]["ra"] wcs.dec = cls.wcs_dicts[sector]["dec"] wcs.roll = cls.wcs_dicts[sector]["roll"] - # This looks wrong because wcs is column major wcs.pixel_shape = (rcolumns, rrows) wcs.wcs.ctype = ["RA---TAN-SIP", "DEC--TAN-SIP"] wcs.wcs.cunit = ["deg", "deg"] @@ -118,7 +117,7 @@ def predict( # initialize object wcs = cls(naxis=2) wcs.ra, wcs.dec, wcs.roll, wcs.camera, wcs.ccd = ra, dec, roll, camera, ccd - wcs.pixel_shape = (rrows, rcolumns) + wcs.pixel_shape = (rcolumns, rrows) # center of the CCD xc, yc = cls.xcent[camera][ccd], cls.ycent[camera][ccd] From cda1d3cbcbd6678772d3b09d744414c0eb8168d0 Mon Sep 17 00:00:00 2001 From: Ben Cassese Date: Sat, 21 Feb 2026 23:20:02 -0500 Subject: [PATCH 2/2] swap rows/columns in overscan correction --- src/tesswcs/locate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tesswcs/locate.py b/src/tesswcs/locate.py index de6d7ec..930c36d 100644 --- a/src/tesswcs/locate.py +++ b/src/tesswcs/locate.py @@ -110,10 +110,10 @@ def get_observability_mask(wcs: WCS, coords: SkyCoord): ).T # Update the mask with those pixels j = ( - (C >= 0) - & (R >= 44) - & (C <= (wcs._naxis[0] - 30)) - & (R <= (wcs._naxis[1] - 44)) + (C >= 44) + & (R >= 0) + & (C <= (wcs._naxis[0] - 44)) + & (R <= (wcs._naxis[1] - 30)) ) k[k] = j return k