aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@gmail.com>2016-06-07 14:44:44 +0800
committerAaron LI <aaronly.me@outlook.com>2016-06-08 21:09:04 +0800
commit22bd38c5c806b768bc00230111a1d9354987ee8c (patch)
tree6bd9fc7d731fc551c7021d29036f250e05d61b6d
parent03abfd529244c1bd7d18baaae6ad1781ce51324d (diff)
downloadchandra-acis-analysis-22bd38c5c806b768bc00230111a1d9354987ee8c.tar.bz2
mass_profile/csb_calc_lwt.sh: drop calc_distance in favor of cosmo_calc
-rwxr-xr-xmass_profile/csb_calc_lwt.sh18
1 files changed, 6 insertions, 12 deletions
diff --git a/mass_profile/csb_calc_lwt.sh b/mass_profile/csb_calc_lwt.sh
index 381c545..fa6e654 100755
--- a/mass_profile/csb_calc_lwt.sh
+++ b/mass_profile/csb_calc_lwt.sh
@@ -1,6 +1,10 @@
#!/bin/sh
#
-# for 'z>0.3' or 'counts_in_0.048R500<500'
+# Calculate the surface brightness concentration (C_SB) for objects
+# meet the conditions: 'z>0.3' or 'counts_in_0.048R500<500'.
+#
+# Aaron LI
+# Updated: 2016-05-28
#
ERR_CALC=1
@@ -9,16 +13,6 @@ ERR_JSON=3
ERR_Z=4
ERR_CNT=5
-## cosmology claculator {{{
-## write the path of cosmo claculator here
-BASE_PATH=`dirname $0`
-COSMO_CALC="${BASE_PATH}/cosmo_calc"
-if [ -z "${COSMO_CALC}" ] || [ ! -x ${COSMO_CALC} ] ; then
- printf "ERROR: ${COSMO_CALC} neither executable nor specified\n"
- exit ${ERR_CALC}
-fi
-## }}}
-
# default basedir relative to 'spc/profile'
DFT_BASEDIR="../.."
# default imgdir relative to 'basedir'
@@ -115,7 +109,7 @@ if [ `echo "${Z} < 0.3" | bc -l` -eq 1 ]; then
# exit ${ERR_Z}
fi
-KPC_PER_PIXEL=`${COSMO_CALC} ${Z} | grep 'kpc/pixel' | awk '{ print $3 }'`
+KPC_PER_PIXEL=`cosmo_calc ${Z} | grep 'kpc/pixel' | awk '{ print $3 }'`
RC_PIX=`echo "scale=2; 0.048 * ${R500} / ${KPC_PER_PIXEL}" | bc -l`
# test counts_in_0.048R500<500?
RC_REG="pie(${X},${Y},0,${RC_PIX},0,360)"