From 4ff0cbc8879f4a2c50a14a9c8373f4eea61a2184 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 7 Jun 2016 19:52:19 +0800 Subject: fit_sbp.sh: update comment; use cosmo_calc --- mass_profile/fit_sbp.sh | 12 +++++++++--- 1 file 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 \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" - -- cgit v1.2.2