diff --git a/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py b/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py index c1f87223cc..2ce7be5315 100644 --- a/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py +++ b/jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py @@ -263,6 +263,7 @@ def _aperture_items_changed(self, msg): self._extract_in_new_instance(subset_lbl=subset_lbl, auto_update=True, add_data=True) except Exception: + raise msg = SnackbarMessage( f"Automatic {self.resulting_product_name} extraction for {subset_lbl} failed", # noqa color='error', sender=self, timeout=10000) @@ -458,9 +459,14 @@ def _extract_from_aperture(self, cube, uncert_cube, mask_cube, aperture, subset_id=aperture.selected, cls=NDDataArray ) if uncert_cube: - uncertainties = uncert_cube.get_subset_object( - subset_id=aperture.selected, cls=StdDevUncertainty - ) + try: + # Subset may not be linked to the uncertainty cube at this point?? + uncertainties = uncert_cube.get_subset_object( + subset_id=aperture.selected, cls=StdDevUncertainty + ) + except ValueError: + raise + uncertainties = None else: uncertainties = None diff --git a/jdaviz/core/template_mixin.py b/jdaviz/core/template_mixin.py index a678570a95..897155a4a0 100644 --- a/jdaviz/core/template_mixin.py +++ b/jdaviz/core/template_mixin.py @@ -2005,6 +2005,8 @@ def __init__(self, plugin, items, selected, multiselect=None, selected_has_subre self.hub.subscribe(self, SubsetUpdateMessage, handler=lambda msg: self._update_subset(msg.subset, msg.attribute)) + self.hub.subscribe(self, SubsetCreateMessage, + handler=lambda msg: self._update_subset(msg.subset)) self.hub.subscribe(self, SubsetDeleteMessage, handler=lambda msg: self._delete_subset(msg.subset)) self.hub.subscribe(self, SubsetRenameMessage, diff --git a/pyproject.toml b/pyproject.toml index 87cffe5ede..1be1debb56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ dependencies = [ "matplotlib>=3.6", "traitlets>=5.0.5", "bqplot>=0.12.37", - "glue-core>=1.20.0", + "glue-core @ git+https://github.com/glue-viz/glue.git@refs/pull/2515/head#egg=glue-core", "glue-jupyter>=0.23.0", "echo>=0.5.0", "ipykernel>=6.19.4",