Skip to content

Commit

Permalink
Merge pull request #50 from esheldon/any-ext
Browse files Browse the repository at this point in the history
ENH support extra extension names
  • Loading branch information
esheldon authored Mar 24, 2021
2 parents b955ccb + b3a0398 commit 066cb3e
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 066cb3e

Please sign in to comment.