From f0eecdf92eb1b3955482240aa6fd957aa7f807e4 Mon Sep 17 00:00:00 2001 From: Eric Jeschke Date: Thu, 30 Nov 2023 17:22:14 -1000 Subject: [PATCH] Fix for MultiDim after Bunch becomes unhashable --- ginga/rv/plugins/MultiDim.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ginga/rv/plugins/MultiDim.py b/ginga/rv/plugins/MultiDim.py index 85c55e687..010f36809 100644 --- a/ginga/rv/plugins/MultiDim.py +++ b/ginga/rv/plugins/MultiDim.py @@ -624,9 +624,13 @@ def redo(self): hdu_dct = self.file_obj.get_directory() upper = len(self.file_obj) - 1 - # NOTE: make a set of values, because some values will be in - # multiple times if known by several indexes - self.prep_hdu_menu(self.w.hdu, list(set(hdu_dct.values()))) + # NOTE: make a unique list of values, because some values will + # be in multiple times if known by several indexes + hdu_lst = [] + for item in hdu_dct.values(): + if item not in hdu_lst: + hdu_lst.append(item) + self.prep_hdu_menu(self.w.hdu, hdu_lst) self.num_hdu = upper self.logger.debug("there are %d hdus" % (upper + 1)) self.w.numhdu.set_text("%d" % (upper + 1))