Skip to content

Commit

Permalink
fix manual extraction for mosaic
Browse files Browse the repository at this point in the history
  • Loading branch information
debora-pe committed Apr 16, 2024
1 parent 7bc96d0 commit 52c0425
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pypeit/manual_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ def by_fitstbl_input(cls, frame: str, inp: str, spectrograph):
m_es = inp.split(';')
for m_e in m_es:
parse = m_e.split(':')
# det_strip will be a list of a single number (no mosaic) or 2 numbers (mosaic)
# det_strip will be a list of a single number (no mosaic) or >= 2 numbers (mosaic)
det_strip = [int(d) for d in parse[0].strip('()').split(',')]
# check if it's negative object (i.e., if the det number is negative)
if np.all([item < 0 for item in det_strip]):
idict['neg'] += [True]
det_strip = [item * -1 for item in det_strip]
else:
idict['neg'] += [False]
if len(det_strip) == 2 and tuple(det_strip) in spectrograph.allowed_mosaics:
if len(det_strip) >= 2 and tuple(det_strip) in spectrograph.allowed_mosaics:
# we use detname, which is a string (e.g., 'DET01', 'MSC01')
idict['detname'] += [spectrograph.get_det_name(tuple(det_strip))]
elif len(det_strip) == 1:
Expand Down

0 comments on commit 52c0425

Please sign in to comment.