-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfix_yaml.sh
52 lines (39 loc) · 1.57 KB
/
fix_yaml.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
band='u'
cluster_name=cl_m4.1e14_z0.059
for dir in $cluster_name/r{0..29}; do
yaml_file=$dir/forecast_"$band"_"$cluster_name".yaml
gs_file=$dir/forecast_"$band"_gs_config.yaml
if [ -f $yaml_file ]; then
sed -i -e 's/#- galsim/- galsim/g; s/- medsmaker/#- medsmaker/g; s/- metacal/#- metacal/g; s/- shear_profile/#- shear_profile/g ' \
-e 's/overwrite: false/overwrite: true/g' $yaml_file
sed -i 's/nexp: 36/nexp: 1/g' $gs_file
fi
done
cluster_name=cl_m4.1e14_z0.3
for dir in $cluster_name/r{0..29}; do
yaml_file=$dir/forecast_"$band"_"$cluster_name".yaml
gs_file=$dir/forecast_"$band"_gs_config.yaml
if [ -f $yaml_file ]; then
sed -i -e 's/#- galsim/- galsim/g; s/- medsmaker/#- medsmaker/g; s/- metacal/#- metacal/g; s/- shear_profile/#- shear_profile/g ' \
-e 's/overwrite: false/overwrite: true/g' $yaml_file
sed -i 's/nexp: 36/nexp: 1/g' $gs_file
fi
done
cluster_name=cl_m4.1e14_z0.45
for dir in $cluster_name/r{0..29}; do
yaml_file=$dir/forecast_"$band"_"$cluster_name".yaml
gs_file=$dir/forecast_"$band"_gs_config.yaml
if [ -f $yaml_file ]; then
sed -i -e 's/#- galsim/- galsim/g; s/- medsmaker/#- medsmaker/g; s/- metacal/#- metacal/g; s/- shear_profile/#- shear_profile/g ' \
-e 's/overwrite: false/overwrite: true/g' $yaml_file
sed -i 's/nexp: 36/nexp: 1/g' $gs_file
fi
done
#########
cluster_name=cl_m4.1e14_z0.3
for dir in $cluster_name/r{0..29}; do
yaml_file=$dir/forecast_"$band"_"$cluster_name".yaml
if [ -f $yaml_file ]; then
sed -i -e 's/#- galsim/- galsim/g' $yaml_file
fi
done