aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-23 18:34:21 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-23 18:34:21 +0800
commit1ba78da3e2cb279896f24b381e5cec2029a9a66d (patch)
tree6c2ee04cafbfd8c6cb8d57bb1bf4356cc9d763dd /bin
parent4a82a0d0a01f1dc3dd952194c516c441ec8f71c7 (diff)
downloadchandra-acis-analysis-1ba78da3e2cb279896f24b381e5cec2029a9a66d.tar.bz2
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".
Diffstat (limited to 'bin')
-rwxr-xr-xbin/event2image.py4
1 files changed, 4 insertions, 0 deletions
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)