From 33ab93bdb91d35eeed1267e4c435e868643bfc98 Mon Sep 17 00:00:00 2001 From: "Brett M. Morris" Date: Fri, 25 Aug 2023 08:37:48 -0400 Subject: [PATCH] fix subset histogram bug in plot options --- jdaviz/configs/default/plugins/plot_options/plot_options.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jdaviz/configs/default/plugins/plot_options/plot_options.py b/jdaviz/configs/default/plugins/plot_options/plot_options.py index b75acf75e1..753239869e 100644 --- a/jdaviz/configs/default/plugins/plot_options/plot_options.py +++ b/jdaviz/configs/default/plugins/plot_options/plot_options.py @@ -4,6 +4,7 @@ from astropy.visualization import PercentileInterval from traitlets import Any, Dict, Float, Bool, Int, List, Unicode, observe +from glue.core.subset_group import GroupedSubset from glue.viewers.scatter.state import ScatterViewerState from glue.viewers.profile.state import ProfileViewerState, ProfileLayerState from glue.viewers.image.state import ImageSubsetLayerState @@ -579,6 +580,10 @@ def _update_stretch_histogram(self, msg={}): # skip further updates if no data are available: return + if isinstance(data, GroupedSubset): + # don't update histogram for subsets: + return + comp = data.get_component(data.main_components[0]) # TODO: further optimization could be done by caching sub_data