From a25e7664ae76d699533a5cbd92f38b45c2fba72a Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 21 Feb 2017 23:25:13 +0800 Subject: Update to use 'cosmo_calc.py' instead of 'cosmo_calc' --- scripts/ciao_calc_csb.sh | 2 +- scripts/ciao_calc_ct.sh | 2 +- scripts/ciao_r500avgt.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/ciao_calc_csb.sh b/scripts/ciao_calc_csb.sh index 6749c64..dc2aea5 100755 --- a/scripts/ciao_calc_csb.sh +++ b/scripts/ciao_calc_csb.sh @@ -196,7 +196,7 @@ if [ `echo "${Z} < 0.3" | bc -l` -eq 1 ]; then # exit ${ERR_Z} fi -KPC_PER_PIX=`cosmo_calc ${Z} | \grep 'kpc.*pix' | tr -d 'a-zA-Z_#=(),:/ '` +KPC_PER_PIX=`cosmo_calc.py -b --kpc-per-pix ${Z}` RC_PIX=`echo "scale=2; 0.048 * ${R500} / ${KPC_PER_PIX}" | bc -l` # test counts_in_0.048R500<500? RC_REG="pie(${X},${Y},0,${RC_PIX},0,360)" diff --git a/scripts/ciao_calc_ct.sh b/scripts/ciao_calc_ct.sh index 65f584a..4b47c90 100755 --- a/scripts/ciao_calc_ct.sh +++ b/scripts/ciao_calc_ct.sh @@ -234,7 +234,7 @@ case "${R500_UNI}" in ;; *) printf "## units in \`kpc', convert to \`Chandra pixel'\n" | ${TOLOG} - KPC_PER_PIX=`cosmo_calc ${REDSHIFT} | \grep 'kpc.*pix' | tr -d 'a-zA-Z_#=(),:/ '` + KPC_PER_PIX=`cosmo_calc.py -b --kpc-per-pix ${REDSHIFT}` # convert scientific notation for `bc' KPC_PER_PIX_B=`echo ${KPC_PER_PIX} | sed 's/[eE]/\*10\^/' | sed 's/+//'` printf "## calculated \`kpc/pixel': ${KPC_PER_PIX_B}\n" diff --git a/scripts/ciao_r500avgt.sh b/scripts/ciao_r500avgt.sh index b94554b..b504ebf 100755 --- a/scripts/ciao_r500avgt.sh +++ b/scripts/ciao_r500avgt.sh @@ -243,7 +243,7 @@ case "${R500_UNI}" in ;; *) printf "## units in \`kpc', convert to \`Chandra pixel'\n" | ${TOLOG} - KPC_PER_PIX=`cosmo_calc ${REDSHIFT} | \grep 'kpc.*pix' | tr -d 'a-zA-Z_#=(),:/ '` + KPC_PER_PIX=`cosmo_calc.py -b --kpc-per-pix ${REDSHIFT}` # convert scientific notation for `bc' KPC_PER_PIX_B=`echo ${KPC_PER_PIX} | sed 's/[eE]/\*10\^/' | sed 's/+//'` printf "## calculated \`kpc/pixel': ${KPC_PER_PIX_B}\n" -- cgit v1.2.2