-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmaster.m
More file actions
72 lines (55 loc) · 1.66 KB
/
master.m
File metadata and controls
72 lines (55 loc) · 1.66 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
%% Master script for the OCC (Lea MA) study
% - Gabor matrices (400 trials)
%% General settings, screens and paths
% Set up MATLAB workspace
clear all;
close all;
clc;
try
Screen('CloseAll');
end
rootFilepath = pwd; % Retrieve the present working directory
% define paths
PPDEV_PATH = '/home/methlab/Documents/MATLAB/ppdev-mex-master'; % For sending EEG triggers
TITTA_PATH = '/home/methlab/Documents/MATLAB/Titta'; % For Tobii ET
DATA_PATH = [rootFilepath, '/data']; % Folder to save data
FUNS_PATH = rootFilepath; % Folder with all functions
MOV_PATH = rootFilepath; % Folder with movie files
% make data dir, if doesn't exist yet
mkdir(DATA_PATH)
% add path to folder with functions
addpath(FUNS_PATH)
% manage screens
screenSettings
AssertOpenGL;
%% Collect ID and Age
dialogID;
%% Check keyboard number for GKI
dialogGKI;
%% Protect Matlab code from participant keyboard input
ListenChar(2);
%% Execute Tasks in randomized order
% BLOCK = 1;
% TASK = 'G';
%T RAINING = 1; % After training, set to 0 here
if ~isfile([DATA_PATH, '/', num2str(subject.ID), '/', [num2str(subject.ID), '_Resting.mat']])
restingEEG
else
disp('RESTING EEG DATA ALREADY EXISTS');
end
if ~isfile([DATA_PATH, '/', num2str(subject.ID), '/', [num2str(subject.ID), '_training.mat']])
TRAINING = 1;
TASK = 'G';
FourStaticGratingsWithTask;
else
disp('TRAINING BLOCK DATA ALREADY EXISTS');
end
if ~isfile([DATA_PATH, '/', num2str(subject.ID), '/', [num2str(subject.ID), '_G_block4.mat']])
TRAINING = 0;
TASK = 'G';
FourStaticGratingsWithTask;
end
%% Don't forget to turn on the power again...
PowerOn;
%% Allow keyboard input into Matlab code
ListenChar(0);