aboutsummaryrefslogtreecommitdiffstats
path: root/mass_profile/calc_all_cooling_time.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mass_profile/calc_all_cooling_time.sh')
-rwxr-xr-xmass_profile/calc_all_cooling_time.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/mass_profile/calc_all_cooling_time.sh b/mass_profile/calc_all_cooling_time.sh
new file mode 100755
index 0000000..2b0ac77
--- /dev/null
+++ b/mass_profile/calc_all_cooling_time.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+if [ $# -eq 1 ]
+then
+ :
+else
+ echo "Usage: <global.cfg list file>"
+ exit
+fi
+
+bdir=`pwd`
+base_path=`dirname $0`
+for i in `cat $1`
+do
+ dname=`dirname $i`
+ #dname=`dirname $dname`
+ echo $dname
+ cd $dname ||continue
+ sbp_cfg=`grep sbp_cfg global.cfg|awk '{print $2}'`
+ if grep n01 $sbp_cfg >/dev/null
+ then
+ echo "dbeta"
+ $base_path/fit_dbeta_nfw_mass_profile.sh global.cfg c
+ else
+ echo "beta"
+ $base_path/fit_beta_nfw_mass_profile.sh global.cfg c
+ fi
+
+ cd $bdir
+done