Skip to content

Commit

Permalink
Merge branch 'fix/determine_slit_edges'
Browse files Browse the repository at this point in the history
  • Loading branch information
DBerke committed Mar 23, 2023
2 parents 8bbb4f4 + fca668d commit 55e7bd5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion geminidr/core/primitives_spect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,10 +1222,11 @@ def determineSlitEdges(self, adinputs=None, **params):

# Get the expected slit center and length for long slit.
if (edges1 is not None) and (edges2 is not None):
log.fullinfo('Using user-supplied edges.')
log.stdinfo('Using user-supplied edges.')
exp_edges_1, exp_edges_2 = edges1, edges2
elif (edges1 is None) and (edges2 is None):
exp_edges_1, exp_edges_2 = self._get_slit_edge_estimates(ad)
log.debug('Estimating fit edges...')
else:
log.warning("Both `edges1` and `edges2` parameters need to be "
"provided in order to use them. Using "
Expand Down
8 changes: 7 additions & 1 deletion geminidr/gnirs/primitives_gnirs_longslit.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,13 @@ def addMDF(self, adinputs=None, suffix=None, mdf=None):
mdf['slitsize_mx'][0] = corrections['slit_long_north']

if ('LongBlue' in ad.camera()):
mdf['x_ccd'][0] = corrections['x_longblue_north']
if not ('111/mm' in ad.disperser()):
# 111/mm can have the illuminated region shifted to
# either side 😔, see e.g. N20120419S0097.fits (right
# edge visible) and N20121213S0312.fits (left edge
# visible). Better to leave it uncorrected and trust
# determineSlitEdges to find the edge in that case.
mdf['x_ccd'][0] = corrections['x_longblue_north']


# For GNIRS, the 'slitsize_mx' column is in arcsec, so grab it:
Expand Down

0 comments on commit 55e7bd5

Please sign in to comment.