Skip to content

Commit

Permalink
Merge pull request #72 from AstarVienna/hb/removepixelsizeagain
Browse files Browse the repository at this point in the history
Remove pixel_size again
  • Loading branch information
hugobuddel authored Nov 14, 2024
2 parents 926b1b7 + 7ffda19 commit 14bb52d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 162 deletions.
2 changes: 1 addition & 1 deletion ESO/compare_yaml_with_drld.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
if props['catg'] != di.dpr_catg:
problems.append(f"{do_catg} has DPR.CATG {props['catg']} in yaml but {di.dpr_catg} in DRLD")
# Workaround for special yaml_tech values that
# are fixed in updateHeaders.py
# are fixed through updateHeaders() in runRecipes.py
yaml_tech = props['tech']
if yaml_tech in ["RAVC,LM", "APP,LM"]:
yaml_tech = "IMAGE,LM"
Expand Down
2 changes: 1 addition & 1 deletion ESO/recipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ IFU_SCI_RAW2:

##################### FOR CORONAGRAPH ################

### KLUDGING THE KEYWORDS A BIT HERE - RUN updateHeaders.py after ####
### KLUDGING THE KEYWORDS A BIT HERE - fixed by updateHeaders() in runRecipes.py ####

##### OFF AXIS PSFs #####

Expand Down
7 changes: 7 additions & 0 deletions ESO/runRecipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,13 @@ def updateHeaders(self):
# open the file
hdul = fits.open(fName)

for hdu in hdul:
# Remove lower case keywords, in particular "pixel_size"
for k in hdu.header:
if k.upper() != k:
print(f"Lower case keyword found and removed: {k}")
hdu.header.pop(k)

hdul[0].header['MJD-OBS'] = mjd

#if type(hdul[0].header['MJD-OBS']) == str:
Expand Down
160 changes: 0 additions & 160 deletions ESO/updateHeaders.py

This file was deleted.

0 comments on commit 14bb52d

Please sign in to comment.