Skip to content

Commit

Permalink
ENH support extra extension names
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr committed Mar 24, 2021
1 parent b955ccb commit b3a0398
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion meds/meds.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,11 @@ def _get_extension_name(self, type):
elif type == "noise":
return "noise_cutouts"
else:
raise ValueError("bad cutout type '%s'" % type)
ext = "%s_cutouts" % type
if ext not in self._fits:
raise ValueError("bad cutout type '%s'" % type)
else:
return ext

def _check_indices(self, iobj, icutout=None):
if iobj >= self._cat.size:
Expand Down

0 comments on commit b3a0398

Please sign in to comment.