-
Notifications
You must be signed in to change notification settings - Fork 3
/
VOGA.m
executable file
·73 lines (73 loc) · 2.59 KB
/
VOGA.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
73
%% VOGA.m
% Video Oculography Analyzer (VOGA)
%
% This script should be used to connect raw files with metadata, segment,
% filter, select cycles, parameterize, and plot batches of files
% containing VOG data.
% To analyze data, navivate to the path with the Raw File, Segmented Files,
% and Cycle Average folders and then run "VOGA." Click cancel to end the
% loop.
%Current version of VOGA - Changed with each GitHub commit
current_ver = 'v5.14.1';
%VOGA Menu Options
opts = {'Generate Folders','Process Raw Data','Segment','Cycle Average',...
'Parameterize and Plot','Advanced'};
advanced_opts = {'Automatic VOG Analysis','Recalibrate LDVOG',...
'Fix Raw VOG Trigger','Combine Segments','Trim Segment','Rename Files',...
'CRF','Set Version','Summary Table','Generate Figures'};
%Run the start procedure first--will make the files needed if they don't
%exist yet
VOGA__setVersion(current_ver,0);
VOGA__saveLastUsedParams;
resp = '';
tf = 1;
while tf
if strcmp(resp,'Advanced') %Give the advanced menu and run that selection
[ind2,tf2] = nmlistdlg('SelectionMode','single','ListString',advanced_opts);
if tf2
resp = advanced_opts{ind2};
end
end
switch resp
case 'Generate Folders'
VOGA__makeFolders(cd,1,0);
case 'Process Raw Data'
VOGA__ProcessRawData;
case 'Segment'
VOGA__Segment;
case 'Cycle Average'
VOGA__CycAvg;
case 'Parameterize and Plot'
VOGA__SummaryTable('Folder (Load)')
VOGA__makePlots('Parameterized')
case 'Automatic VOG Analysis'
VOGA__automaticAnalysis;
case 'Fix Raw VOG Trigger'
updateRawVOGTrigger;
case 'Recalibrate LDVOG'
RecalibrateRawLDVOG;
case 'Combine Segments'
VOGA__combineSegments;
case 'Trim Segment'
VOGA__trimSegment;
case 'Rename Files'
VOGA__RenameFiles;
case 'Summary Table'
VOGA__SummaryTable;
case 'Set Version'
VOGA__setVersion(current_ver,1);
case 'CRF'
VOGA__CRF;
case 'Generate Figures'
VOGA__makePlots;
end
if ismember(resp,advanced_opts) %Stay in advanced menu if started in advanced menu
resp = 'Advanced';
else % Poll for new reponse from main menu
[ind1,tf] = nmlistdlg('SelectionMode','single','ListString',opts);
if tf
resp = opts{ind1};
end
end
end
disp('VOGA instance ended.')