diff options
author | Aaron LI <aaronly.me@gmail.com> | 2016-05-27 22:47:24 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@gmail.com> | 2016-05-27 22:47:24 +0800 |
commit | ffd178e0bd72562a3c2cff9747b6e656edc881dc (patch) | |
tree | 8800b7b5b2e8bc3df1a6760df5cd54eaaa686702 /mass_profile/fit_mass.sh | |
parent | 5c35fad9240fb42c1371c721e0b2af7379bd9ea0 (diff) | |
download | chandra-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/fit_mass.sh')
-rwxr-xr-x | mass_profile/fit_mass.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/mass_profile/fit_mass.sh b/mass_profile/fit_mass.sh new file mode 100755 index 0000000..141d16c --- /dev/null +++ b/mass_profile/fit_mass.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# + +if [ $# -eq 1 ]; then + : +elif [ $# -eq 2 ]; then + CENTER_VALUE="YES" +else + printf "usage: $0 <mass_conf> [c]\n" + exit 1 +fi +cfg_file=$1 +if [ "$0" = `basename $0` ]; then + script_path=`which $0` + base_path=`dirname ${script_path}` +else + base_path=`dirname $0` +fi + +sbp_cfg=`grep '^sbp_cfg' $cfg_file | awk '{ print $2 }'` + +if grep -q '^beta2' $sbp_cfg; then + MODEL="double-beta" + PROG=fit_nfwmass_dbeta.sh +else + MODEL="single-beta" + PROG=fit_nfwmass_beta.sh +fi + +printf "## MODEL: ${MODEL}\n" +if [ "x${CENTER_VALUE}" = "xYES" ]; then + $base_path/$PROG $cfg_file c +else + $base_path/$PROG $cfg_file +fi + |