From 7259d229c67e9f5ff8bfbaef4f73bf3cd3efa3dc Mon Sep 17 00:00:00 2001 From: "T. E. Pickering" Date: Mon, 29 Jan 2024 19:30:51 -0600 Subject: [PATCH] will this fix it? --- mmtwfs/scripts/reanalyze.py | 3 ++- mmtwfs/wfs.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mmtwfs/scripts/reanalyze.py b/mmtwfs/scripts/reanalyze.py index 08f1523..4b86e17 100644 --- a/mmtwfs/scripts/reanalyze.py +++ b/mmtwfs/scripts/reanalyze.py @@ -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 diff --git a/mmtwfs/wfs.py b/mmtwfs/wfs.py index d03dcb1..6ffd873 100644 --- a/mmtwfs/wfs.py +++ b/mmtwfs/wfs.py @@ -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