Skip to content

Commit

Permalink
Fix for MultiDim after Bunch becomes unhashable
Browse files Browse the repository at this point in the history
  • Loading branch information
ejeschke committed Dec 1, 2023
1 parent 2004e10 commit f0eecdf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ginga/rv/plugins/MultiDim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit f0eecdf

Please sign in to comment.