From 6f54ac3a111961792230af1734c8a88af1537063 Mon Sep 17 00:00:00 2001 From: Jean Connelly Date: Wed, 9 Oct 2024 15:18:09 -0400 Subject: [PATCH 1/2] Open up filename globs and regex for CP data --- mica/vv/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mica/vv/core.py b/mica/vv/core.py index 5b20ad25..64956ef5 100644 --- a/mica/vv/core.py +++ b/mica/vv/core.py @@ -377,7 +377,7 @@ def _aiid_from_asol(self, asol_file, obsdir): self.obspar["tstop"] <= header["TSTART"] ): return None - aiid_match = re.search(r"(pcadf\d+[^_]*)_", asol_file) + aiid_match = re.search(r"(pcad\w\d+[^_]*)_", asol_file) if aiid_match: return dict(id=aiid_match.group(1), dir=obsdir) @@ -946,7 +946,7 @@ def _read_ocat_stars(self): def _identify_missing_slot(self, slot): datadir = self.aspdir adat_files = glob( - os.path.join(datadir, "pcadf*N???_adat{}1.fits*".format(slot)) + os.path.join(datadir, "pcad*N???_adat{}1.fits*".format(slot)) ) if not len(adat_files): return None From 55508a65cd334eba7dc8998d6b01a99e87319ad2 Mon Sep 17 00:00:00 2001 From: Jean Connelly Date: Wed, 9 Oct 2024 15:21:13 -0400 Subject: [PATCH 2/2] Ruff --- mica/vv/core.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mica/vv/core.py b/mica/vv/core.py index 64956ef5..923d2136 100644 --- a/mica/vv/core.py +++ b/mica/vv/core.py @@ -945,9 +945,7 @@ def _read_ocat_stars(self): def _identify_missing_slot(self, slot): datadir = self.aspdir - adat_files = glob( - os.path.join(datadir, "pcad*N???_adat{}1.fits*".format(slot)) - ) + adat_files = glob(os.path.join(datadir, "pcad*N???_adat{}1.fits*".format(slot))) if not len(adat_files): return None hdulist = pyfits.open(adat_files[0])