This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFOBVisualizer_Auto.m
72 lines (60 loc) · 2.33 KB
/
FOBVisualizer_Auto.m
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
function FOBVisualizer_Auto(filelist, parameters)
% function for automatically evaluating Brillouin data
%% start evaluation program
[controllers, model] = FOBVisualizer;
drawnow;
for jj = 1:length(filelist)
try
%% construct filename
loadFile = [filelist(jj).folder filesep filelist(jj).name];
if ~exist(loadFile, 'file')
continue;
end
%% load the data file
controllers.data.openFile(loadFile);
for ii = 1:length(model.ODT.repetitions)
for kk = 1:length(model.Brillouin.repetitions)
try
%% set current repetition
ODTrep.index = ii;
ODTrep.name = model.ODT.repetitions{ii};
model.ODT.repetition = ODTrep;
BMrep.index = kk;
BMrep.name = model.Brillouin.repetitions{kk};
model.Brillouin.repetition = BMrep;
controllers.ODT.loadRepetition();
controllers.Brillouin.loadRepetition();
controllers.data.loadAlignmentData();
controllers.data.setParameters(parameters);
drawnow;
%% align ODT and BM
if parameters.Alignment.do
controllers.data.openAlignment();
try
model.controllers.Alignment.findz0();
model.controllers.Alignment.start();
model.controllers.Alignment.save();
catch
end
model.controllers.Alignment.close();
drawnow;
end
%% calculate density and modulus
if parameters.density.do
controllers.density.calculateDensity();
drawnow;
end
%% save the data file
controllers.data.save();
catch e
disp(e);
end
end
end
%% close the rawdata file
controllers.data.closeFile();
catch e
disp(e);
end
end
controllers.closeGUI();