aboutsummaryrefslogtreecommitdiffstats
path: root/mass_profile/calc_all_cooling_time.sh
blob: 2b0ac779e80df4f2d8881bd1c04e83139a49e294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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