Skip to content

Commit

Permalink
Preserve slit information
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Sep 14, 2021
1 parent 133de19 commit 288f49d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions jdaviz/configs/mosviz/plugins/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ def _parse_as_spectrum1d(path):
except IORegistryError:
data = _parse_as_spectrum1d(data)

# Copy (if present) region to top-level meta object
if ('header' in data.meta and
'S_REGION' in data.meta['header'] and
'S_REGION' not in data.meta):
data.meta['S_REGION'] = data.meta['header']['S_REGION']

# Get the corresponding label for this data product
label = data_labels[index]

Expand Down

0 comments on commit 288f49d

Please sign in to comment.