aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-09-03 17:01:47 +0800
committerAaron LI <aly@aaronly.me>2017-09-03 17:01:47 +0800
commit6653e976c4ab07e1e8b36bf2f7ad59bb9d723def (patch)
tree5895eab31d3a4c4a676cd1f68a8eb80a34508476
parent1369952c740cff4b135a7fe9ca7b15e2cc92623a (diff)
downloadatoolbox-6653e976c4ab07e1e8b36bf2f7ad59bb9d723def.tar.bz2
calc_radial_psd.py: do not require EXPOSURE keyword
-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)