From 341e0bfd3379744d85243695e40971e7b66d2925 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 26 Feb 2017 12:54:54 +0800 Subject: make_expmap.py: Add "BUNIT" raw keyword after 'dmimgcalc' --- bin/make_expmap.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin') 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: -- cgit v1.2.2