diff options
author | Aaron LI <aaronly.me@outlook.com> | 2015-11-08 20:15:49 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2015-11-08 20:15:49 +0800 |
commit | 520a7c1d7e2d633473f2fa0f39da31ae6c870dc4 (patch) | |
tree | f8cd57800f930d6e3072899da14bbff87d53a10e /scripts | |
parent | feface82970cf7e897ca02ac150fbb27d45c2213 (diff) | |
download | chandra-acis-analysis-520a7c1d7e2d633473f2fa0f39da31ae6c870dc4.tar.bz2 |
chandra_update_xpeak.sh: Also add offset to info json
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/chandra_update_xpeak.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/chandra_update_xpeak.sh b/scripts/chandra_update_xpeak.sh index 5381e98..71d5b06 100755 --- a/scripts/chandra_update_xpeak.sh +++ b/scripts/chandra_update_xpeak.sh @@ -59,7 +59,7 @@ esac ## default parameters {{{ # critical offset (in pixel) -OFFSET_CRIC=10 +OFFSET_CRIC=20 # energy range: 700-2000 eV E_RANGE="700:2000" # default `event file' which used to match `blanksky' files @@ -294,14 +294,17 @@ echo "point(${PEAK_RA},${PEAK_DEC})" > ${PEAK_WCS_REG} if [ "${F_UPDATE}" = "YES" ]; then cp -f ${INFO_JSON} ${INFO_JSON}_bak - printf "update X-ray peak coordinate for info.json ...\n" + printf "update/add X-ray peak coordinate to info.json ...\n" if \grep -qE 'XPEAK_(RA|DEC)' ${INFO_JSON}; then printf "update ...\n" sed -i'' "s/XPEAK_RA.*$/XPEAK_RA\":\ \"${PEAK_RA}\",/" ${INFO_JSON} sed -i'' "s/XPEAK_DEC.*$/XPEAK_DEC\":\ \"${PEAK_DEC}\",/" ${INFO_JSON} + sed -i'' "s/XPEAK_XCNTRD_dist.*$/XPEAK_XCNTRD_dist\ (pix)\":\ \"${OFFSET}\",/" ${INFO_JSON} else printf "add ...\n" sed -i'' "/\"Dec\.\"/ a\ +\ \ \ \ \"XPEAK_XCNTRD_dist\ (pix)\": \"${OFFSET}\"," ${INFO_JSON} + sed -i'' "/\"Dec\.\"/ a\ \ \ \ \ \"XPEAK_DEC\": \"${PEAK_DEC}\"," ${INFO_JSON} sed -i'' "/\"Dec\.\"/ a\ \ \ \ \ \"XPEAK_RA\": \"${PEAK_RA}\"," ${INFO_JSON} |