Skip to content

Commit

Permalink
Merge branch 'develop' into truncate_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
kbwestfall authored Jun 4, 2024
2 parents cd233c8 + fbc378f commit 75f1043
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions pypeit/spectrographs/vlt_fors.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,23 @@ def compound_meta(self, headarr, meta_key):
binning = parse.binning2string(binspec, binspatial)
return binning
elif meta_key == 'decker':
mode = headarr[0]['HIERARCH ESO INS MODE']
if mode in ['LSS', 'MOS']:
try: # Science
return headarr[0]['HIERARCH ESO INS SLIT NAME']
except KeyError: # Standard!
try:
return headarr[0]['HIERARCH ESO SEQ SPEC TARG']
except KeyError:
return headarr[0]['HIERARCH ESO INS MOS CHECKSUM']
elif mode == 'IMG':
# This is for the bias frames
return None
if 'DECKER' in headarr[0]:
return headarr[0]['DECKER']
else:
msgs.error(f"PypeIt does not currently support VLT/FORS2 '{mode}' data reduction.")
mode = headarr[0]['HIERARCH ESO INS MODE']
if mode in ['LSS', 'MOS']:
try: # Science
return headarr[0]['HIERARCH ESO INS SLIT NAME']
except KeyError: # Standard!
try:
return headarr[0]['HIERARCH ESO SEQ SPEC TARG']
except KeyError:
return headarr[0]['HIERARCH ESO INS MOS CHECKSUM']
elif mode == 'IMG':
# This is for the bias frames
return None
else:
msgs.error(f"PypeIt does not currently support VLT/FORS2 '{mode}' data reduction.")
else:
msgs.error("Not ready for this compound meta")

Expand Down Expand Up @@ -336,10 +339,10 @@ def config_specific_par(self, scifile, inp_par=None):
par['flexure']['spec_method'] = 'skip'
#par['reduce']['skysub']['bspline_spacing'] = 0.6

if 'lSlit' in self.get_meta_value(scifile, 'decker') or 'LSS' in self.get_meta_value(scifile, 'decker'):
decker = self.get_meta_value(scifile, 'decker')
if 'lSlit' in decker or 'LSS' in decker:
par['calibrations']['slitedges']['sync_predict'] = 'nearest'


return par

def config_independent_frames(self):
Expand Down

0 comments on commit 75f1043

Please sign in to comment.