From 349f66f5ab07483da557eca33a4a5df3f7163d3b Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Thu, 16 Mar 2023 09:10:41 -0400 Subject: [PATCH] exclude slice for 2d images in cubeviz --- jdaviz/configs/imviz/plugins/coords_info/coords_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdaviz/configs/imviz/plugins/coords_info/coords_info.py b/jdaviz/configs/imviz/plugins/coords_info/coords_info.py index 9a15848afe..c5947be514 100644 --- a/jdaviz/configs/imviz/plugins/coords_info/coords_info.py +++ b/jdaviz/configs/imviz/plugins/coords_info/coords_info.py @@ -280,7 +280,7 @@ def _image_viewer_update(self, viewer, x, y): coords_status = False slice_plugin = self.app._jdaviz_helper.plugins.get('Slice', None) - if slice_plugin is not None: + if slice_plugin is not None and len(image.shape) == 3: # float to be compatible with default value of nan self._dict['slice'] = float(slice_plugin.slice) self._dict['spectral_axis'] = slice_plugin.wavelength