We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a00926a + 222ebda commit e0d0876Copy full SHA for e0d0876
1 file changed
python/lsst/eotest/image_utils.py
@@ -26,7 +26,9 @@ def __init__(self, infile, hdu=0):
26
except:
27
# This exception occurs when DM stack encounters a "." in
28
# a FITS header keyword.
29
- self.header = fits.open(infile)[hdu].header
+ with fits.open(infile) as hdulist:
30
+ self.header = dict()
31
+ self.header.update(hdulist[hdu].header)
32
33
def get(self, key):
34
return self(key)
0 commit comments