aboutsummaryrefslogtreecommitdiffstats
path: root/mass_profile/csb_calc_lwt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mass_profile/csb_calc_lwt.sh')
-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)"