Skip to content

Commit

Permalink
new functionality behind dev flag
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Jan 21, 2025
1 parent b2ed1ed commit e9ed798
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jdaviz/configs/specviz/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from glue.core.subset_group import GroupedSubset
from specutils import SpectralRegion, Spectrum1D

from jdaviz.core import data_formats
from jdaviz.core.helpers import ConfigHelper
from jdaviz.core.events import RedshiftMessage
from jdaviz.configs.default.plugins.line_lists.line_list_mixin import LineListMixin
Expand Down Expand Up @@ -33,6 +34,7 @@ class Specviz(ConfigHelper, LineListMixin):

_default_configuration = "specviz"
_default_spectrum_viewer_reference_name = "spectrum-viewer"
_dev_deconfig = False

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -74,9 +76,9 @@ def load_data(self, data, data_label=None, format=None, show_in_viewer=True,
`~astropy.utils.data.download_file` or
`~astroquery.mast.Conf.timeout`).
"""
from jdaviz.core import data_formats
parser = data_formats.get_parser(data)

if not self._dev_deconfig and parser != 'specviz-spectrum1d-parser':
raise NotImplementedError("Only Spectrum1D data is supported in Specviz.")
parser_kwargs = {'mosviz-spec2d-parser': {'show_in_viewer': show_in_viewer,
'data_labels': data_label},
'specreduce-trace': {'show_in_viewer': show_in_viewer,
Expand Down

0 comments on commit e9ed798

Please sign in to comment.