From e25c5de8b787269a69eb93f32f51ad690207f600 Mon Sep 17 00:00:00 2001 From: Jack O'Donnell Date: Tue, 2 Jul 2024 13:52:53 -0700 Subject: [PATCH 1/3] Using slitmask information from tilted slits. Simple change --- pypeit/spectrographs/gemini_gmos.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pypeit/spectrographs/gemini_gmos.py b/pypeit/spectrographs/gemini_gmos.py index e00506920e..856fc2503c 100644 --- a/pypeit/spectrographs/gemini_gmos.py +++ b/pypeit/spectrographs/gemini_gmos.py @@ -617,11 +617,8 @@ def get_slitmask(self, filename): offsets = np.sqrt( mask_tbl['slitpos_x'].to('arcsec').value**2 + mask_tbl['slitpos_y'].to('arcsec').value**2) - # NOT READY FOR TILTS - if np.any(np.invert(np.isclose(mask_tbl['slittilt'].value, 0.))): - msgs.error('NOT READY FOR TILTED SLITS') - # NOT SURE WE HAVE THE TILT SIGN CORRECT - slit_pas = posx_pa + mask_tbl['slittilt'].to('deg').value + # Sign here checked by Jack O'Donnell + slit_pas = posx_pa - mask_tbl['slittilt'].to('deg').value off_signs = np.ones_like(slit_pas) negy = mask_tbl['slitpos_y'] < 0. off_signs[negy] = -1. From 3222eebc15de6197e36fa4aef923d4e16ecc696d Mon Sep 17 00:00:00 2001 From: Jack O'Donnell Date: Wed, 3 Jul 2024 18:40:59 -0700 Subject: [PATCH 2/3] Small adjustment to predicted slit positions --- pypeit/spectrographs/gemini_gmos.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pypeit/spectrographs/gemini_gmos.py b/pypeit/spectrographs/gemini_gmos.py index 856fc2503c..382fabda3b 100644 --- a/pypeit/spectrographs/gemini_gmos.py +++ b/pypeit/spectrographs/gemini_gmos.py @@ -691,7 +691,7 @@ def get_maskdef_slitedges(self, ccdnum=None, filename=None, debug=None, self.get_slitmask(maskfile) # Binning of flat - _, bin_spat= parse.parse_binning(binning) + _, bin_spat = parse.parse_binning(binning) # Slit center slit_coords = SkyCoord(ra=self.slitmask.onsky[:,0], @@ -708,15 +708,16 @@ def get_maskdef_slitedges(self, ccdnum=None, filename=None, debug=None, left_edges = [] right_edges = [] for islit in range(self.slitmask.nslits): - # DEBUGGING - #islit = 14 # 10043 + # JOD: Need to adjust predicted images by slit tilt (which is + # slit PA relative to mask PA) + slittilt = self.slitmask.onsky[islit,4] - self.slitmask.posx_pa # Left coord left_coord = slit_coords[islit].directional_offset_by( self.slitmask.onsky[islit,4]*units.deg - 180.*units.deg, - self.slitmask.onsky[islit,2]*units.arcsec/2.) + self.slitmask.onsky[islit,2]*units.arcsec/2./np.cos(np.radians(slittilt))) right_coord = slit_coords[islit].directional_offset_by( self.slitmask.onsky[islit,4]*units.deg, - self.slitmask.onsky[islit,2]*units.arcsec/2.) + self.slitmask.onsky[islit,2]*units.arcsec/2./np.cos(np.radians(slittilt))) got_it = False for kk, iwcs in enumerate(wcss): @@ -744,6 +745,7 @@ def get_maskdef_slitedges(self, ccdnum=None, filename=None, debug=None, left_edges = np.array(left_edges).astype(float) right_edges = np.array(right_edges).astype(float) sortindx = np.argsort(left_edges) + return left_edges, right_edges, sortindx, self.slitmask class GeminiGMOSSHamSpectrograph(GeminiGMOSSpectrograph): From f01de16c9b5b38cd97443ac799e28e73feaad9a4 Mon Sep 17 00:00:00 2001 From: Jack O'Donnell Date: Wed, 10 Jul 2024 10:36:41 -0700 Subject: [PATCH 3/3] Added description of update to the "Instrument-Specific Updates" section of the release notes --- doc/releases/1.16.1dev.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/releases/1.16.1dev.rst b/doc/releases/1.16.1dev.rst index 33b59d4259..2f9e1cf019 100644 --- a/doc/releases/1.16.1dev.rst +++ b/doc/releases/1.16.1dev.rst @@ -19,6 +19,11 @@ Functionality/Performance Improvements and Additions Instrument-specific Updates --------------------------- +- GMOS-South: PypeIt reductions of GMOS-South MOS observations now properly + account for tilted slits in the mask design file. Previously, these data + could only be reduced without including any information from the slitmask + design. + Script Changes --------------