aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/ciao_expcorr.sh
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2015-05-27 10:49:15 +0800
committerAaron LI <aaronly.me@outlook.com>2015-05-27 10:49:15 +0800
commit57ff0ed9c57a2c4bca2e7e1a592b6636e0457887 (patch)
tree18c928263483429a4cb70df3701d37417def81b2 /scripts/ciao_expcorr.sh
parentd4abd260e133ec4d4c36ba9de7f709c534ee419d (diff)
downloadchandra-acis-analysis-57ff0ed9c57a2c4bca2e7e1a592b6636e0457887.tar.bz2
Updated ciao_calc_ct.sh, ciao_expcorr.sh, ciao_r500avgt.sh, ciao_sbp.sh
ciao_r500avgt.sh, ciao_calc_ct.sh: Updated to also find '.rmf' & '.arf' files in addition to '.wrmf' & '.warf'. ciao_sbp.sh: Skip skyfov generation if already exists Renamed parameter 'aspec' to 'aspect' ciao_expcorr.sh Added 'aspect' parameter for skyfov to fix the 'FoV shift bug'
Diffstat (limited to 'scripts/ciao_expcorr.sh')
-rwxr-xr-xscripts/ciao_expcorr.sh56
1 files changed, 25 insertions, 31 deletions
diff --git a/scripts/ciao_expcorr.sh b/scripts/ciao_expcorr.sh
index c72973f..c1d7905 100755
--- a/scripts/ciao_expcorr.sh
+++ b/scripts/ciao_expcorr.sh
@@ -1,36 +1,32 @@
#!/bin/sh
-#
-unalias -a
-export LC_COLLATE=C
-###########################################################
-## make `image' from `evt file' ##
-## make `spectral weight' using `make_instmap_weights' ##
-## use `fluximage' to generating `exposure map' ##
-## make `exposure-corrected' image ##
-## and extract `surface brighness profile' ##
-## ##
-## NOTES: ##
-## only ACIS-I (chip: 0-3) and ACIS-S (chip: 7) supported##
-## `merge_all' conflict with Heasoft's `pget' etc. tools ##
-## ##
-## LIweitiaNux <liweitianux@gmail.com> ##
-## August 16, 2012 ##
-###########################################################
-
-###########################################################
+##
+## make `image' from `evt file'
+## make `spectral weight' using `make_instmap_weights'
+## use `fluximage' to generating `exposure map'
+## make `exposure-corrected' image
+## and extract `surface brighness profile'
+##
+## NOTES:
+## only ACIS-I (chip: 0-3) and ACIS-S (chip: 7) supported
+## `merge_all' conflict with Heasoft's `pget' etc. tools
+##
+## Weitian LI
+## 2012/08/16
+UPDATED="2014/10/30"
+##
## ChangeLogs:
+## v2.1, 2014/10/30, Weitian LI
+## Add 'aspect' parameter for 'skyfov' to fix the 'FoV shift bug'
## v2.0, 2014/07/29, Weitian LI
## `merge_all' deprecated, use `fluximage' if possible
## v1.2, 2012-08-21, LIweitiaNux
## set `ardlib' before process `merge_all'
## v1.1, 2012-08-21, LIweitiaNux
## fix a bug with `sed'
-###########################################################
+##
-## about, used in `usage' {{{
-VERSION="v2.0"
-UPDATE="2014-07-29"
-## about }}}
+unalias -a
+export LC_COLLATE=C
## error code {{{
ERR_USG=1
@@ -54,8 +50,8 @@ case "$1" in
-[hH]*|--[hH]*)
printf "usage:\n"
printf " `basename $0` evt=<evt_file> energy=<e_start:e_end:e_width> basedir=<base_dir> nh=<nH> z=<redshift> temp=<avg_temperature> abund=<avg_abund> [ logfile=<log_file> ]\n"
- printf "\nversion:\n"
- printf "${VERSION}, ${UPDATE}\n"
+ printf "\nupdated:\n"
+ printf "${UPDATED}\n"
exit ${ERR_USG}
;;
esac
@@ -300,11 +296,8 @@ make_instmap_weights outfile="${SPEC_WGT}" \
## spectral weights }}}
## generate `skyfov'
-# XXX: omit `aspec', NOT provide `asol' file
-# otherwise the size of evt_img NOT match the `expmap'
printf "generate skyfov ...\n"
-SKYFOV="_skyfov.fits"
-[ -e "${SKYFOV}" ] && rm -fv ${SKYFOV}
+SKYFOV="skyfov.fits"
punlearn skyfov
skyfov infile="${EVT}" outfile="${SKYFOV}" aspect="@${ASOLIS}" clobber=yes
@@ -348,7 +341,8 @@ if `which merge_all >/dev/null 2>&1`; then
## XXX: `merge_all' needs `asol files' in working directory
printf "link asol files into currect dir (\`merge_all' needed) ...\n"
for f in `cat ${ASOLIS}`; do
- ln -sv ${BASEDIR}/${f} .
+ asol=`basename ${f}`
+ ln -svf ${BASEDIR}/${asol} .
done
printf "use \`merge_all' to generate \`exposure map' ONLY ...\n"