aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-26 12:54:54 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-26 12:54:54 +0800
commit341e0bfd3379744d85243695e40971e7b66d2925 (patch)
tree9936afbc19dbc2bf21e39d580d3272143f70e9c4 /bin
parentbf57afb121e682a60190486a5622135604c8c3a0 (diff)
downloadchandra-acis-analysis-341e0bfd3379744d85243695e40971e7b66d2925.tar.bz2
make_expmap.py: Add "BUNIT" raw keyword after 'dmimgcalc'
Diffstat (limited to 'bin')
-rwxr-xr-xbin/make_expmap.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/make_expmap.py b/bin/make_expmap.py
index 370036b..3c7995c 100755
--- a/bin/make_expmap.py
+++ b/bin/make_expmap.py
@@ -125,8 +125,10 @@ def make_exposure_map(outfile, asphistfile, instmapfile, xygrid,
"clobber=%s" % clobber, "mode=h"
])
# Copy several keywords from instrument map (as ``fluximage`` does)
+ logger.info("Copy several keywords from instrument map ...")
copy_keyword(instmapfile, outfile,
- keyword=["SPECTRUM", "WGTFILE", "ENERG_LO", "ENERG_HI"])
+ keyword=["SPECTRUM", "WGTFILE",
+ "ENERG_LO", "ENERG_HI", "GRATING"])
def combine_expmaps(outfile, expmaps, clobber=False):
@@ -147,6 +149,9 @@ def combine_expmaps(outfile, expmaps, clobber=False):
"operation=%s" % operation,
"clobber=%s" % clobber
])
+ # Add the lost "BUNIT" keyword during ``dmimgcalc``
+ write_keyword(outfile, keyword="BUNIT", value="cm**2 s")
+ # Remove original exposure maps for single chip
for f in expmaps:
os.remove(f)
else: