aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/chandra_update_xpeak.sh7
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}