diff --git a/CHANGES.rst b/CHANGES.rst index a73707f384..602fe56d63 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,8 @@ Bug Fixes - Standalone mode: stop jdaviz/voila processes when closing app. [#2791] +- Fixes compatibility with glue >= 1.19. [#2820] + Cubeviz ^^^^^^^ diff --git a/jdaviz/app.py b/jdaviz/app.py index 0258ac7253..3df6ce6b73 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -95,13 +95,17 @@ def to_unit(self, data, cid, values, original_units, target_units): # gives the units of the values array, which might not be the same # as the original native units of the component in the data. if cid.label == "flux": - spec = data.get_object(cls=Spectrum1D) - if len(values) == 2: - # Need this for setting the y-limits - spec_limits = [spec.spectral_axis[0].value, spec.spectral_axis[-1].value] - eqv = u.spectral_density(spec_limits*spec.spectral_axis.unit) + try: + spec = data.get_object(cls=Spectrum1D) + except RuntimeError: + eqv = [] else: - eqv = u.spectral_density(spec.spectral_axis) + if len(values) == 2: + # Need this for setting the y-limits + spec_limits = [spec.spectral_axis[0].value, spec.spectral_axis[-1].value] + eqv = u.spectral_density(spec_limits * spec.spectral_axis.unit) + else: + eqv = u.spectral_density(spec.spectral_axis) else: # spectral axis eqv = u.spectral() diff --git a/pyproject.toml b/pyproject.toml index 17591ae389..38d256a80b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ "traitlets>=5.0.5", "bqplot>=0.12.37", "bqplot-image-gl>=1.4.11", - "glue-core>=1.17.1,!=1.19.0", + "glue-core>=1.17.1", "glue-jupyter>=0.20", "echo>=0.5.0", "ipykernel>=6.19.4",