Skip to content

Commit

Permalink
will this fix it?
Browse files Browse the repository at this point in the history
  • Loading branch information
tepickering committed Jan 30, 2024
1 parent a4bb4c9 commit 7259d22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mmtwfs/scripts/reanalyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@

def check_image(f, wfskey=None):
hdr = {}
with fits.open(f, ignore_missing_simple=True).verify('fix') as hdulist:
with fits.open(f, ignore_missing_simple=True) as hdulist:
hdulist.verify('silentfix')
for h in hdulist:
hdr.update(h.header)
data = hdulist[-1].data
Expand Down
3 changes: 2 additions & 1 deletion mmtwfs/wfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def check_wfsdata(data, header=False):
if isinstance(data, (str, pathlib.PosixPath)):
# we're a fits file (hopefully)
try:
with fits.open(data, ignore_missing_simple=True).verify('fix') as h:
with fits.open(data, ignore_missing_simple=True) as h:
h.verify('fix')
data = h[-1].data # binospec images put the image data into separate extension so always grab last available.
if header:
hdr = h[-1].header
Expand Down

0 comments on commit 7259d22

Please sign in to comment.