-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_pathline.m
More file actions
155 lines (136 loc) · 6.16 KB
/
run_pathline.m
File metadata and controls
155 lines (136 loc) · 6.16 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
setenv('PATH', '/home/chenchu/Project/flowvis/tools:/home/chenchu/Project/flowvis/4D/tools:/home/chenchu/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games')
sampling = 1;
test = 1;
RUN_TRACING = 1;
switch test
case 0
case_folder = 'diag3dtime';
base_path = '/data/flow/diag3dtime';
true_list_file = sprintf('%s/all2.list', base_path);
%fitted_list_file = sprintf('%s/fitted/fitted%d/all_bezier_rms.list', base_path, sampling);
%dbr_list_file = sprintf('%s/all_%d.list', base_path, ceil(sampling/2));
[files, W, H, D, T, scaling] = load_list(true_list_file);
SEEDING_STEP=64;
seeds_x = SEEDING_STEP/2:SEEDING_STEP:W;
seeds_y = SEEDING_STEP/2:SEEDING_STEP:H;
seeds_z = SEEDING_STEP/2:SEEDING_STEP:D;
scale=1;
case 1
label = 'isabel'
base_path = '/data/flow/isabel_all';
true_list_file = sprintf('%s/all2.list', base_path);
%fitted_list_file = sprintf('%s/fitted/fitted%d/all_bezier_rms.list', base_path, sampling);
%dbr_list_file = sprintf('%s/all_%d.list', base_path, ceil(sampling/2));
[files, W, H, D, T, scaling] = load_list(true_list_file);
SEEDING_STEP=1; % 20 3125 seeds
seeds_x = SEEDING_STEP/2:SEEDING_STEP:W;
seeds_y = SEEDING_STEP/2:SEEDING_STEP:H;
seeds_z = SEEDING_STEP/2:SEEDING_STEP:D;
scale=1;
case 11
label = 'isabel_test'
base_path = '/data/flow/isabel_all';
true_list_file = sprintf('%s/all2.list', base_path);
%fitted_list_file = sprintf('%s/fitted/fitted%d/all_bezier_rms.list', base_path, sampling);
%dbr_list_file = sprintf('%s/all_%d.list', base_path, ceil(sampling/2));
[files, W, H, D, T, scaling] = load_list(true_list_file);
SEEDING_STEP=20;
seeds_x = SEEDING_STEP/2:SEEDING_STEP:W;
seeds_y = SEEDING_STEP/2:SEEDING_STEP:H;
seeds_z = 50;
scale=1;
%seeds_z = SEEDING_STEP/2:SEEDING_STEP:D;
case 12
label = 'isabel_vis'
base_path = '/data/flow/isabel_all';
true_list_file = sprintf('%s/all2.list', base_path);
%fitted_list_file = sprintf('%s/fitted/fitted%d/all_bezier_rms.list', base_path, sampling);
%dbr_list_file = sprintf('%s/all_%d.list', base_path, ceil(sampling/2));
[files, W, H, D, T, scaling] = load_list(true_list_file);
SEEDING_STEP=100;
seeds_x = 200:20:250;
seeds_y = 100:20:150;
seeds_z = 50;
scale=1;
case 2
label = 'plume'
base_path = '/data/flow2/plume252_all';
true_list_file = sprintf('%s/all2.list', base_path);
%fitted_list_file = sprintf('%s/fitted/fitted%d/all_bezier_rms.list', base_path, sampling);
%dbr_list_file = sprintf('%s/all_%d.list', base_path, ceil(sampling/2));
[files, W, H, D, T, scaling] = load_list(true_list_file);
SEEDING_STEP=1; % 7200 seeds
seeds_x = SEEDING_STEP/2:SEEDING_STEP:W;
seeds_y = SEEDING_STEP/2:SEEDING_STEP:H;
seeds_z = SEEDING_STEP/2:SEEDING_STEP:D;
scale=1;
case 21
label = 'plume_vis'
base_path = '/data/flow2/plume126_all';
true_list_file = sprintf('%s/all2.list', base_path);
%fitted_list_file = sprintf('%s/fitted/fitted%d/all_bezier_rms.list', base_path, sampling);
%dbr_list_file = sprintf('%s/all_%d.list', base_path, ceil(sampling/2));
[files, W, H, D, T, scaling] = load_list(true_list_file);
SEEDING_STEP=2.5; % 7200 seeds
seeds_x = 53:SEEDING_STEP:73;
seeds_y = seeds_x;
seeds_z = 250;
scale = 1;
case 3
label = 'climate'
base_path = '/data/flow2/smhagos/curvilinear';
true_list_file = sprintf('%s/all2.list', base_path);
%fitted_list_file = sprintf('%s/fitted/fitted%d/all_bezier_rms.list', base_path, sampling);
%dbr_list_file = sprintf('%s/all_%d.list', base_path, ceil(sampling/2));
[files, W, H, D, T, scaling] = load_list(true_list_file);
SEEDING_STEP=1 % 7200 seeds
seeds_x = SEEDING_STEP/2:SEEDING_STEP:W;
seeds_y = SEEDING_STEP/2:SEEDING_STEP:H;
seeds_z = SEEDING_STEP/2:SEEDING_STEP:D;
scale = 1;
case 31
label = 'climate_vis'
base_path = '/data/flow2/smhagos/curvilinear';
true_list_file = sprintf('%s/all2.list', base_path);
%fitted_list_file = sprintf('%s/fitted/fitted%d/all_bezier_rms.list', base_path, sampling);
%dbr_list_file = sprintf('%s/all_%d.list', base_path, ceil(sampling/2));
[files, W, H, D, T, scaling] = load_list(true_list_file);
SEEDING_STEP=50 % 7200 seeds
seeds_x = SEEDING_STEP/2:SEEDING_STEP:W;
seeds_y = SEEDING_STEP/2:SEEDING_STEP:H;
seeds_z = D/2
scale = 1;
case 4
label = 'karman'
base_path = '/data/flow2/karman/vec/3D/';
true_list_file = sprintf('%s/all2.list', base_path);
%fitted_list_file = sprintf('%s/fitted/fitted%d/all_bezier_rms.list', base_path, sampling);
%dbr_list_file = sprintf('%s/all_%d.list', base_path, ceil(sampling/2));
[files, W, H, D, T, scaling] = load_list(true_list_file);
SEEDING_STEP=5; % 5184 * 3 = 15552 seeds
seeds_x = floor(SEEDING_STEP/2):SEEDING_STEP:W-1;
seeds_y = H/4+floor(SEEDING_STEP/2):SEEDING_STEP:H-H/4;
seeds_z = 2.5;
scale = 5;
end
%STEP_SIZE = 1/sampling/8
%case_folder = sprintf('%s_%d', label, sampling);
case_folder = sprintf('%s', label);
% auto
mkdir (case_folder)
% gen seeds
seed_file = sprintf('%s/seeds.txt', case_folder);
if 0
gen_seed(seed_file, seeds_x, seeds_y, seeds_z, 0, false);
% gen_seed(seed_file, 250:20:300, 150:20:200:SEEDING_STEP:H, 50);
end
%% run
% truth
traces_true_file = sprintf('%s/trace_all.out', case_folder)
omp_nproc=4
if RUN_TRACING & 1
cmd = sprintf('parallelPathline_omp %s -loader=1 -saver=0 -limit=3 -omp_nproc=%d -stepsize=.25 -seedfile=%s -out=%s -scale=%f -maxT=1 -nproc=1' , ...
true_list_file, omp_nproc, seed_file, traces_true_file, scale)
system(cmd);
%system(sprintf('convertPathlineVTK %s', traces_true_file));
end