Skip to content

Commit

Permalink
bugfix: display(): non-standard extension names can be displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-simpson committed Aug 29, 2023
1 parent 159439b commit 37565b2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions geminidr/core/primitives_visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,11 @@ def display(self, adinputs=None, **params):
ext.operate(np.squeeze)

# Get the data we're going to display. TODO Replace extname with attr?
data = getattr(ext, {'SCI':'data', 'DQ':'mask',
'VAR':'variance'}[extname], None)
try:
data = getattr(ext, {'SCI':'data', 'DQ':'mask',
'VAR':'variance'}[extname])
except KeyError:
data = getattr(ext, extname, None)
dqdata = ext.mask
if data is None:
log.warning("No data to display in {}[{}]".format(ext.filename,
Expand Down

0 comments on commit 37565b2

Please sign in to comment.