Skip to content

Commit

Permalink
Merge pull request #76 from AstarVienna/hb/improve_check_headers
Browse files Browse the repository at this point in the history
Let check_headers.py work with static calibration files.
  • Loading branch information
hugobuddel authored Nov 15, 2024
2 parents 1548407 + 0f7f233 commit c6ef947
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ESO/check_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@
# Assert all subsystems in HIERARCH keyword are max 8 characters.
assert all(len(ki) <= 8 for ki in ks), k

catg = fn_fits.name.split(".")[1]
fn_split = fn_fits.name.split(".")
catg = fn_split[1] if fn_split[0] == "METIS" else fn_split[0]
if catg in HACK_RAWS_THAT_SHOULD_BE_ADDED_TO_THE_DRLD:
continue
di = METIS_DataReductionLibraryDesign.dataitems[catg]
assert hdus[0].header["ESO DPR CATG"] == di.dpr_catg
assert hdus[0].header["ESO DPR TYPE"] == di.dpr_type
assert hdus[0].header["ESO DPR TECH"] == di.dpr_tech
if di.dpr_catg:
assert hdus[0].header["ESO DPR CATG"] == di.dpr_catg
if di.dpr_type:
assert hdus[0].header["ESO DPR TYPE"] == di.dpr_type
if di.dpr_tech:
assert hdus[0].header["ESO DPR TECH"] == di.dpr_tech

0 comments on commit c6ef947

Please sign in to comment.