-
Notifications
You must be signed in to change notification settings - Fork 19
/
test_script.m
100 lines (85 loc) · 2.99 KB
/
test_script.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
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
%% Test REST (go to 'REST' folder)
%% set path and initialize bcilab
rest_path = './';
bcilab_path = which('bcilab.m');
if isempty(bcilab_path)
current_path = pwd;
addpath(fullfile(rest_path, 'dependencies', 'BCILAB'));
bcilab
cd(current_path);
addpath(genpath(rest_path));
end
%% refresh workspace
% clear all will break bcilab and require it to restart as it uses global variables
close all hidden
clearvars -except rest_path
timer = timerfindall;
if ~isempty(timer)
stop(timerfindall); delete(timerfindall);
disp('Delete timers...');
end
%% define opts structure
% whether to customize pipeline
opts.customize_pipeline = false;
opts.save_config = false;
% % % Emotiv - setting
% % (optional) define config file name
% opts.config = 'Config_ORICA_EmotivEPOC';
%
% % point to headModel
% opts.headModel = fullfile(rest_path, 'data', 'head_models', 'emotivHeadModel_file');
%
% % (optional) path to calibration data and select time window
% opts.calibration_data = fullfile(rest_path, 'data', 'Demo_EmotivEPOC_EyeOpen.set');
% opts.calibration_window = [0,60]; % sec
% % % Quick 20 - setting
% % channel locations
% load(fullfile(rest_path, 'data', 'chanlocs', 'Quick20.mat'));
% opts.chanlocs = chanlocs;
%
% % (optional) define config file name
% opts.config = 'Config_ORICA_quick20';
%
% % point to headModel
% opts.headModel = fullfile(rest_path, 'data', 'head_models', 'quick20HeadModel');
%
% % (optional) path to calibration data and select time window
% opts.calibration_data = fullfile(rest_path, 'data', 'Quick20_Luca_calib_EyeOpen.set');
% opts.calibration_window = [0,60]; % sec
% % % Quick 30 - setting
% % channel locations
% load(fullfile(rest_path, 'data/chanlocs/Quick30.mat'));
% opts.chanlocs = chanlocs;
%
% % (optional) define config file name
% opts.config = 'Config_ORICA_quick30';
%
% % (optional) path to calibration data and select time window
% opts.calibration_data = fullfile(rest_path, 'data', 'Quick30_Shawn_EyeOpen.set');
% opts.calibration_window = [0,133]; % sec
%
% % (optional) load eyeCatch library
% opts.libEyeCatch = load(fullfile(rest_path, 'dependencies', 'eyeCatch', 'libEyeCatch.mat'));
%
% % (optional) load IC_MARC model
% opts.modIcMarc = load(fullfile(rest_path, 'dependencies', 'IC_MARC', 'spatial2.mat'));
%
% % use playback data
% opts.playback = 1;
% % Smarting - setting
% channel locations
load(fullfile(rest_path, 'data/chanlocs/Smarting24.mat'));
opts.chanlocs = chanlocs;
% (optional) define config file name
opts.config = 'Config_ORICA_smarting24';
% (optional) path to calibration data and select time window
opts.calibration_data = fullfile(rest_path, 'data', 'Smarting_220219_1311.set');
opts.calibration_window = [0,133]; % sec
% (optional) load eyeCatch library
opts.libEyeCatch = load(fullfile(rest_path, 'dependencies', 'eyeCatch', 'libEyeCatch.mat'));
% (optional) load IC_MARC model
opts.modIcMarc = load(fullfile(rest_path, 'dependencies', 'IC_MARC', 'spatial2.mat'));
% use playback data
opts.playback = 1;
%% start REST
REST(opts)