aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/ciao_bkg_spectra_v4.sh
diff options
context:
space:
mode:
authorWeitian LI <liweitianux@gmail.com>2014-07-29 16:01:32 +0800
committerWeitian LI <liweitianux@gmail.com>2014-07-29 16:01:32 +0800
commit42a71c13678a0066eeb94812de1102eec5843bb9 (patch)
tree0cdfdea4672e68fd4e72085d03b6d2a79b408b81 /scripts/ciao_bkg_spectra_v4.sh
parentf9bf035529a0676d5291cffb2557699e3eaf310e (diff)
downloadchandra-acis-analysis-42a71c13678a0066eeb94812de1102eec5843bb9.tar.bz2
Updates scripts aganist CIAO-4.6
Diffstat (limited to 'scripts/ciao_bkg_spectra_v4.sh')
-rwxr-xr-xscripts/ciao_bkg_spectra_v4.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/ciao_bkg_spectra_v4.sh b/scripts/ciao_bkg_spectra_v4.sh
index bc40151..b4dbbbd 100755
--- a/scripts/ciao_bkg_spectra_v4.sh
+++ b/scripts/ciao_bkg_spectra_v4.sh
@@ -31,6 +31,8 @@ export LC_COLLATE=C
# (through cmdline which similar to CIAO,
# and default filename match patterns)
# add simple `logging' function
+# v4.1, 2014/07/29, Weitian LI
+# fix 'pbkfile' parameters for CIAO-4.6
###########################################################
## about, used in `usage' {{{
@@ -307,11 +309,18 @@ for reg_i in ${REGLIST}; do
# NO background response files
# NO background spectrum (generate by self)
# NO spectrum grouping (group by self using `grppha')
+ # 'pbkfile' parameter deprecated in CIAO-4.6
+ if `pget specextract pbkfile >/dev/null 2>&1`; then
+ P_PBKFILE="pbkfile='${PBK}'"
+ else
+ P_PBKFILE=""
+ fi
+ #
printf "use \`specextract' to generate spectra and response ...\n"
punlearn specextract
specextract infile="${EVT}[sky=region(${REG_TMP})]" \
outroot=${LBKG_PI%.pi} bkgfile="" asp="@${ASOLIS}" \
- pbkfile="${PBK}" mskfile="${MSK}" badpixfile="${BPIX}" \
+ ${P_PBKFILE} mskfile="${MSK}" badpixfile="${BPIX}" \
weight=yes correct=no bkgresp=no \
energy="0.3:11.0:0.01" channel="1:1024:1" \
combine=no binarfwmap=2 \