aboutsummaryrefslogtreecommitdiffstats
path: root/mass_profile/calc_all_cooling_time.sh
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@gmail.com>2016-05-27 22:47:24 +0800
committerAaron LI <aaronly.me@gmail.com>2016-05-27 22:47:24 +0800
commitffd178e0bd72562a3c2cff9747b6e656edc881dc (patch)
tree8800b7b5b2e8bc3df1a6760df5cd54eaaa686702 /mass_profile/calc_all_cooling_time.sh
parent5c35fad9240fb42c1371c721e0b2af7379bd9ea0 (diff)
downloadchandra-acis-analysis-ffd178e0bd72562a3c2cff9747b6e656edc881dc.tar.bz2
Add mass_profile tools
* These tools are mainly use to calculate the total gravitational mass profile, as well as the intermediate products (e.g., surface brightness profile fitting, gas density profile, NFW fitting, etc.) * There are additional tools for calculating the luminosity and flux. * These tools mainly developed by Junhua GU, and contributed by Weitian (Aaron) LI, and Zhenghao ZHU.
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