Skip to content

Commit

Permalink
Merge pull request #308 from sot/work-with-cp-data
Browse files Browse the repository at this point in the history
Open up regex on file name and glob to work with CP data
  • Loading branch information
taldcroft authored Oct 29, 2024
2 parents 1508dd5 + 55508a6 commit 9a3c5ab
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mica/vv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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, "pcadf*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])
Expand Down

0 comments on commit 9a3c5ab

Please sign in to comment.