Skip to content

Commit

Permalink
Add SpectrumList support to Mosviz spec1d parser
Browse files Browse the repository at this point in the history
  • Loading branch information
duytnguyendtn committed Jul 15, 2021
1 parent 9ef0c19 commit 1ed225f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jdaviz/configs/mosviz/plugins/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ def mos_spec1d_parser(app, data_obj, data_labels=None):
"""
# If providing a file path, parse it using the specutils io tooling
if _check_is_file(data_obj):
data_obj = [Spectrum1D.read(data_obj)]
try:
data_obj = [Spectrum1D.read(data_obj)]
except IORegistryError:
data_obj = SpectrumList.read(data_obj)

if isinstance(data_labels, str):
data_labels = [data_labels]
Expand Down

0 comments on commit 1ed225f

Please sign in to comment.