diff options
author | Aaron LI <aaronly.me@outlook.com> | 2017-02-26 20:42:33 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2017-02-26 20:42:33 +0800 |
commit | 59fa9c0cbb21d817a8261217d5a2865dcdc422e5 (patch) | |
tree | 66b95062a680cab2675f92c1f9a5fcff95626309 | |
parent | c90edb6fef7518da2cdf4634837021f9afac2161 (diff) | |
download | chandra-acis-analysis-59fa9c0cbb21d817a8261217d5a2865dcdc422e5.tar.bz2 |
ciao_deproj_spectra.sh: Change variable 'LINES' to 'NREG'
It seems the 'LINES' may be used as a environment variable.
-rwxr-xr-x | scripts/ciao_deproj_spectra.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/ciao_deproj_spectra.sh b/scripts/ciao_deproj_spectra.sh index e134fde..c9df80a 100755 --- a/scripts/ciao_deproj_spectra.sh +++ b/scripts/ciao_deproj_spectra.sh @@ -355,10 +355,10 @@ cat ${REG_IN} | sed 's/#.*$//' | \grep -Ev '^\s*$' > ${REG_NEW} ## REG_IN }}} ## `specextract' to extract spectrum {{{ -LINES="`wc -l ${REG_NEW} | cut -d' ' -f1`" +NREG="`wc -l ${REG_NEW} | cut -d' ' -f1`" printf "\n======================================\n" -printf "TOTAL *${LINES}* regions to process ......\n" -for i in `seq ${LINES}`; do +printf "TOTAL *${NREG}* regions to process ......\n" +for i in `seq ${NREG}`; do printf "\n==============================\n" printf ">>> PROCESS REGION ${i} ...\n" @@ -510,7 +510,7 @@ statistic chi # load data _EOF_ -for i in `seq ${LINES}`; do +for i in `seq ${NREG}`; do RSPEC="r${i}_${ROOTNAME}" [ -r "${RSPEC}.wrmf" ] && RMF="${RSPEC}.wrmf" || RMF="${RSPEC}.rmf" [ -r "${RSPEC}.warf" ] && ARF="${RSPEC}.warf" || ARF="${RSPEC}.arf" @@ -554,7 +554,7 @@ model projct*wabs*apec 1 0.01 0 0 1e+24 1e+24 _EOF_ -INPUT_TIMES=`expr ${LINES} - 1` +INPUT_TIMES=`expr ${NREG} - 1` for i in `seq ${INPUT_TIMES}`; do cat >> ${XSPEC_DEPROJ} << _EOF_ = 1 @@ -588,7 +588,7 @@ statistic chi # load data _EOF_ -for i in `seq ${LINES}`; do +for i in `seq ${NREG}`; do RSPEC="r${i}_${ROOTNAME}" [ -r "${RSPEC}.wrmf" ] && RMF="${RSPEC}.wrmf" || RMF="${RSPEC}.rmf" [ -r "${RSPEC}.warf" ] && ARF="${RSPEC}.warf" || ARF="${RSPEC}.arf" @@ -629,7 +629,7 @@ model wabs*apec 1 0.01 0 0 1e+24 1e+24 _EOF_ -INPUT_TIMES=`expr ${LINES} - 1` +INPUT_TIMES=`expr ${NREG} - 1` for i in `seq ${INPUT_TIMES}`; do cat >> ${XSPEC_PROJTD} << _EOF_ = 1 |