From 520a7c1d7e2d633473f2fa0f39da31ae6c870dc4 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 8 Nov 2015 20:15:49 +0800 Subject: chandra_update_xpeak.sh: Also add offset to info json --- scripts/chandra_update_xpeak.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts') 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} -- cgit v1.2.2