From 57ff0ed9c57a2c4bca2e7e1a592b6636e0457887 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 27 May 2015 10:49:15 +0800 Subject: 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' --- scripts/ciao_expcorr.sh | 56 ++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 31 deletions(-) (limited to 'scripts/ciao_expcorr.sh') 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 ## -## 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= energy= basedir= nh= z= temp= abund= [ logfile= ]\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" -- cgit v1.2.2