-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcreate_experiments.sh
executable file
·61 lines (57 loc) · 1.49 KB
/
create_experiments.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
53
54
55
56
57
58
59
60
61
#!/bin/bash
while getopts d:e:n: flag
do
case "${flag}" in
d) directory=${OPTARG};;
e) experiment_num=${OPTARG};;
n) num_experiments=${OPTARG};;
esac
done
: "${experiment_num:=0}"
: "${num_experiments:=10000}"
seed=1
# 0 omnidirectional; 1 pinhole
camera_nums=(0 1)
# 0 isotropic homogeneous; 1 isotropic inhomogeneous; 2 anisotropic homogenous; 3 anisotropic inhomogeneous
noise_nums=(0 1 2 3)
translation=("true" "false")
if [ $experiment_num == "0" ]
then
linspace_start=0.125
linspace_end=4.0
linspace_num=32
fi
if [ $experiment_num == "1" ]
then
linspace_start=0.5
linspace_end=0.975
linspace_num=20
fi
if [ $experiment_num == "2" ]
then
linspace_start=0.0
linspace_end=10.0
linspace_num=21
fi
if [ $experiment_num == "3" ]
then
linspace_start=0.0
linspace_end=0.5
linspace_num=21
fi
for camera_num in "${camera_nums[@]}"
do
for t in "${translation[@]}"
do
if [ $experiment_num != "1" ]
then
for noise_num in "${noise_nums[@]}"
do
./build/create_experiments ${directory} ${experiment_num} ${camera_num} ${t} ${noise_num} -n=${num_experiments} -s=${seed} -ls=${linspace_start} -le=${linspace_end} -ln=${linspace_num} &
done
else
./build/create_experiments ${directory} ${experiment_num} ${camera_num} ${t} 0 -n=${num_experiments} -s=${seed} -ls=${linspace_start} -le=${linspace_end} -ln=${linspace_num} &
fi
wait
done
done