generated from fcerpe/localizer_visual_motion
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vbBlock_setParameters.m
143 lines (102 loc) · 3.86 KB
/
vbBlock_setParameters.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
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
% (C) Copyright 2020 CPP visual motion localizer developpers
function [cfg] = vbBlock_setParameters()
% VISUAL LOCALIZER
% Initialize the parameters and general configuration variables
cfg = struct();
% by default the data will be stored in an output folder created where the
% setParamters.m file is
% change that if you want the data to be saved somewhere else
cfg.dir.output = fullfile(fileparts(mfilename('fullpath')), 'output');
%% Debug mode settings
cfg.debug.do = false; % To test the script out of the scanner, skip PTB sync
cfg.debug.smallWin = false; % To test on a part of the screen, change to 1
cfg.debug.transpWin = false; % To test with trasparent full size screen
cfg.debug.showMouse = false;
cfg.skipSyncTests = 1;
cfg.verbose = 1;
%% Engine parameters
cfg.testingDevice = 'mri';
cfg.eyeTracker.do = false;
cfg.audio.do = false;
cfg = setMonitor(cfg);
% Keyboards
cfg = setKeyboards(cfg);
% MRI settings
cfg = setMRI(cfg);
cfg.pacedByTriggers.do = false;
%% Experiment Design
cfg.design.localizer = 'VWFA';
% french (f) and braille (b): real word (rw), pseudo-word (pw),
% non-word (nw), fake-script (fs)
cfg.design.names = {'frw','fpw','fnw','ffs','brw','bpw','bnw','bfs'};
cfg.design.nbRepetitions = 3;
cfg.design.nbEventsPerBlock = 4;
%% Timing
% CHANGE MANUALLY, REMOVING FRAMES IF NEEDED
% SCANNER MONITOR IS NOT ACCURATE
% mac is worse than windows
% different lines of code
% win
cfg.timing.eventDuration = 3.5 - (1/60)*29; % second
% mac - half. Is it weird? Huge variations whether plugged or on
% battery
% cfg.timing.eventDuration = 3.06;
% Time between blocs in secs
cfg.timing.IBI = 6;
% Time between events in secs
cfg.timing.ISI = [0.8 1 1.2];
% Number of seconds before the motion stimuli are presented
cfg.timing.onsetDelay = 0;
% Number of seconds after the end all the stimuli before ending the run
cfg.timing.endDelay = 3;
%% Task(s)
cfg.task.name = 'words decoding';
% Instruction
cfg.task.instruction = 'Détecte le stimulus répété';
% Fixation cross (in pixels)
cfg.fixation.type = 'cross';
cfg.fixation.color = cfg.color.red;
cfg.fixation.width = .2;
cfg.fixation.lineWidthPix = 3;
cfg.fixation.xDisplacement = 0;
cfg.fixation.yDisplacement = 0;
% target (referring to the words)
cfg.target.maxNbPerBlock = 1; % 0 or 1, otherwise too crowded
cfg.target.duration = 0.1; % In secs
cfg.target.type = 'repetition';
cfg.extraColumns = {'image', 'target', 'event', 'block', 'isi', 'keyName'};
end
function cfg = setKeyboards(cfg)
cfg.keyboard.escapeKey = 'ESCAPE';
cfg.keyboard.responseKey = {'c','b','a','d','t'};
cfg.keyboard.keyboard = [];
cfg.keyboard.responseBox = [];
if strcmpi(cfg.testingDevice, 'mri')
cfg.keyboard.keyboard = [];
cfg.keyboard.responseBox = [];
end
end
function cfg = setMRI(cfg)
% letter sent by the trigger to sync stimulation and volume acquisition
cfg.mri.triggerKey = 's';
cfg.mri.triggerNb = 1;
cfg.mri.repetitionTime = 1.75;
cfg.bids.MRI.Instructions = 'Detect the repeated stimulus';
cfg.bids.MRI.TaskDescription = [];
end
function cfg = setMonitor(cfg)
% Monitor parameters for PTB
cfg.color.white = [255 255 255];
cfg.color.black = [0 0 0];
cfg.color.red = [255 0 0];
cfg.color.grey = mean([cfg.color.black; cfg.color.white]);
cfg.color.background = cfg.color.black;
cfg.text.color = cfg.color.white;
% Monitor parameters
cfg.screen.monitorWidth = 50; % in cm
cfg.screen.monitorDistance = 40; % distance from the screen in cm
if strcmpi(cfg.testingDevice, 'mri')
cfg.screen.monitorWidth = 25;
cfg.screen.monitorDistance = 95;
end
end