diff options
author | Aaron LI <aaronly.me@gmail.com> | 2016-06-07 19:52:19 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@gmail.com> | 2016-06-07 19:52:19 +0800 |
commit | 4ff0cbc8879f4a2c50a14a9c8373f4eea61a2184 (patch) | |
tree | 046225fa500b2bb87247a589b14c3f08010e81d3 | |
parent | 43692e5f1d9ac09eb67bd1555b71f24ec8d86bf4 (diff) | |
download | chandra-acis-analysis-4ff0cbc8879f4a2c50a14a9c8373f4eea61a2184.tar.bz2 |
fit_sbp.sh: update comment; use cosmo_calc
-rwxr-xr-x | mass_profile/fit_sbp.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mass_profile/fit_sbp.sh b/mass_profile/fit_sbp.sh index 76aaaaf..666be2f 100755 --- a/mass_profile/fit_sbp.sh +++ b/mass_profile/fit_sbp.sh @@ -1,5 +1,12 @@ #!/bin/sh # +# Handy script for SBP fitting. +# This script wraps the 'fit_beta_sbp' and 'fit_dbeta_sbp', +# and automatically determine the sbp model according to the config file. +# +# Weitian LI +# 2013-02-20 +# if [ $# -ne 1 ]; then printf "usage: $0 <mass_conf>\n" @@ -19,8 +26,8 @@ t_param_file=`grep '^t_param_file' $cfg_file | awk '{ print $2 }'` nh=`grep '^nh' $cfg_file | awk '{ print $2 }'` abund=`grep '^abund' $cfg_file | awk '{ print $2 }'` z=`grep '^z' $sbp_cfg | awk '{ print $2 }'` -cm_per_pixel=`${base_path}/calc_distance ${z} | grep 'cm_per_pixel' | awk '{ print $2 }'` -sed -i'' "s/^cm_per_pixel.*$/cm_per_pixel ${cm_per_pixel}/" ${sbp_cfg} +cm_per_pixel=`cosmo_calc ${z} | grep 'cm/pixel' | awk -F':' '{ print $2 }'` +sed -i'' "s/^cm_per_pixel.*$/cm_per_pixel ${cm_per_pixel}/" ${sbp_cfg} cfunc_file=`grep '^cfunc_file' $sbp_cfg | awk '{ print $2 }'` T_file=`grep '^T_file' $sbp_cfg | awk '{ print $2 }'` @@ -40,4 +47,3 @@ fi $base_path/$PROG $sbp_cfg printf "## MODEL: ${MODEL}\n" printf "## z: ${z}\n" - |