From 1ba78da3e2cb279896f24b381e5cec2029a9a66d Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 23 Feb 2017 18:34:21 +0800 Subject: event2image.py: Update keyword "DETNAM" of the created image The "DETNAM" keyword of the created image is updated to show the actually available chips. Therefore, there won't be issues when this image is corrected for exposure by dividing the exposure map. And the exposure-corrected image will have correct "DETNAM" value instead of "Merged". --- bin/event2image.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bin') diff --git a/bin/event2image.py b/bin/event2image.py index 44189e0..66fdf91 100755 --- a/bin/event2image.py +++ b/bin/event2image.py @@ -17,6 +17,7 @@ from _context import acispy from acispy.manifest import get_manifest from acispy.pfiles import setup_pfiles from acispy.acis import ACIS +from acispy.header import write_keyword def make_image(infile, outfile, chips, erange, fov, clobber=False): @@ -95,6 +96,9 @@ def main(): print("erange:", erange, file=sys.stderr) make_image(infile, outfile, chips, erange, fov, args.clobber) + chips_all = ACIS.get_chips_str(infile) + write_keyword(outfile, keyword="DETNAM", + value="ACIS-{0}".format(chips_all)) # Add created image to manifest key = "img_e{erange}".format(erange=erange) -- cgit v1.2.2