From b3a03988264006108c33ceda76778315abb90763 Mon Sep 17 00:00:00 2001 From: "Matthew R. Becker" Date: Wed, 24 Mar 2021 08:44:28 -0500 Subject: [PATCH] ENH support extra extension names --- meds/meds.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meds/meds.py b/meds/meds.py index ded4232..2928451 100644 --- a/meds/meds.py +++ b/meds/meds.py @@ -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: