Skip to content

Commit

Permalink
Make opening the _jump.fits files more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavies-st committed Oct 18, 2023
1 parent 11aeebf commit 1c9d08a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/snowblind/persist.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ def flag_saturated_in_subsequent(self, models_sorted, time_deltas):
def get_saturation_masks(self, models_sorted):
"""Get boolean SATURATION mask from output of JumpStep
"""
file_names = [m.meta.filename.replace("_cal", "_jump") for m in models_sorted]
# For the list of input files, convert them to the _jump.fits filenames
def jumpify(filename):
return filename[:26] + filename[26:26+filename[26:].find("_")] + \
"_jump.fits"

file_names = [jumpify(m.meta.filename) for m in models_sorted]

masks = []
for f in file_names:
Expand Down

0 comments on commit 1c9d08a

Please sign in to comment.