From 05a655816448cccc5b752dd625f9bf3e2952bed2 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Tue, 16 Apr 2024 17:36:02 -0400 Subject: [PATCH 1/4] Reverts #2809 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5c10ad09d7..0c1db31fdf 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.18.0,!=1.19.0", + "glue-core>=1.18.0", "glue-jupyter>=0.20", "echo>=0.5.0", "ipykernel>=6.19.4", From 9ffa236e0ae19032d69e8c25fc1739e59f654f0a Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:49:29 -0400 Subject: [PATCH 2/4] Do not assume flux comp has spectral_axis --- jdaviz/app.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/jdaviz/app.py b/jdaviz/app.py index 2a8d3ed761..53e437a57a 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 Exception: + 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() From 280a51399d15b14068f517549960a7084035e86f Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Fri, 19 Apr 2024 07:44:19 -0400 Subject: [PATCH 3/4] specify RuntimeError --- jdaviz/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdaviz/app.py b/jdaviz/app.py index 53e437a57a..5003dbd175 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -97,7 +97,7 @@ def to_unit(self, data, cid, values, original_units, target_units): if cid.label == "flux": try: spec = data.get_object(cls=Spectrum1D) - except Exception: + except RuntimeError: eqv = [] else: if len(values) == 2: From a39a0fe6e859204c188bf69fa4742b1b548a5f1f Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Fri, 19 Apr 2024 10:04:15 -0400 Subject: [PATCH 4/4] changelog entry --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 19becee349..d63945f496 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -72,6 +72,8 @@ Bug Fixes - Standalone mode: stop jdaviz/voila processes when closing app. [#2791] +- Fixes compatibility with glue >= 1.19. [#2820] + Cubeviz ^^^^^^^