aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-23 19:44:29 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-23 19:44:29 +0800
commit79690e2eaaa047cf94ac5ae31349f66bf0c67028 (patch)
treeed18b197f4e7f6f5e0a06b47a4d2c52730eeb683 /bin
parentfdcbbe97d30c7b28e9299e37d33127c2fbc8a332 (diff)
downloadchandra-acis-analysis-79690e2eaaa047cf94ac5ae31349f66bf0c67028.tar.bz2
clean_evt2.py: Update "DETNAM" keyword after filter out chips
Diffstat (limited to 'bin')
-rwxr-xr-xbin/clean_evt2.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/clean_evt2.py b/bin/clean_evt2.py
index 5b53922..0712e6e 100755
--- a/bin/clean_evt2.py
+++ b/bin/clean_evt2.py
@@ -27,6 +27,7 @@ from acispy.manifest import get_manifest
from acispy.pfiles import setup_pfiles
from acispy.acis import ACIS
from acispy.ds9 import ds9_view
+from acispy.header import write_keyword
logging.basicConfig(level=logging.INFO)
@@ -176,6 +177,7 @@ def main():
else:
infile = manifest.getpath("evt2", relative=True)
chips = ACIS.get_chips_str(infile, sep="-")
+ chips_all = ACIS.get_chips_str(infile)
logger.info("infile: %s" % infile)
logger.info("chips: %s" % chips)
@@ -187,6 +189,8 @@ def main():
gtifile = os.path.splitext(lcfile)[0] + ".gti"
filter_chips(infile, evt2_chips, chips, clobber=args.clobber)
+ write_keyword(evt2_chips, keyword="DETNAM",
+ value="ACIS-{0}".format(chips_all))
detect_sources(evt2_chips, srcfile, clobber=args.clobber)
remove_sources(evt2_chips, evt2_rmsrc, srcfile, clobber=args.clobber)
extract_lightcurve(evt2_rmsrc, lcfile, clobber=args.clobber)