aboutsummaryrefslogtreecommitdiffstats
path: root/python/calc_radial_psd.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/calc_radial_psd.py')
-rwxr-xr-xpython/calc_radial_psd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/calc_radial_psd.py b/python/calc_radial_psd.py
index 23bd819..6bb1708 100755
--- a/python/calc_radial_psd.py
+++ b/python/calc_radial_psd.py
@@ -277,7 +277,7 @@ class AstroImage:
print("Loading image ... ", end="", flush=True)
with fits.open(image) as imgfits:
self.image = imgfits[0].data.astype(np.float)
- self.exposure = imgfits[0].header["EXPOSURE"]
+ self.exposure = imgfits[0].header.get("EXPOSURE")
if verbose:
print("DONE", flush=True)
@@ -296,7 +296,7 @@ class AstroImage:
print("Loading background map ... ", end="", flush=True)
with fits.open(bkgmap) as imgfits:
self.bkgmap = imgfits[0].data.astype(np.float)
- self.exposure_bkg = imgfits[0].header["EXPOSURE"]
+ self.exposure_bkg = imgfits[0].header.get("EXPOSURE")
if verbose:
print("DONE", flush=True)