|
| 1 | +% (C) Copyright 2020 CPP visual motion localizer developpers |
| 2 | + |
1 | 3 | function [cfg] = setParameters()
|
2 | 4 |
|
3 | 5 | % VISUAL LOCALIZER
|
|
9 | 11 | % setParamters.m file is
|
10 | 12 | % change that if you want the data to be saved somewhere else
|
11 | 13 | cfg.dir.output = fullfile( ...
|
12 |
| - fileparts(mfilename('fullpath')), '..', ... |
13 |
| - 'output'); |
| 14 | + fileparts(mfilename('fullpath')),'output'); |
14 | 15 |
|
15 | 16 | %% Debug mode settings
|
16 | 17 |
|
17 | 18 | cfg.debug.do = false; % To test the script out of the scanner, skip PTB sync
|
18 | 19 | cfg.debug.smallWin = false; % To test on a part of the screen, change to 1
|
19 | 20 | cfg.debug.transpWin = false; % To test with trasparent full size screen
|
20 | 21 |
|
21 |
| - cfg.verbose = false; |
| 22 | + cfg.skipSyncTests = 0; |
| 23 | + |
| 24 | + cfg.verbose = 1; |
22 | 25 |
|
23 | 26 | %% Engine parameters
|
24 | 27 |
|
|
33 | 36 |
|
34 | 37 | % MRI settings
|
35 | 38 | cfg = setMRI(cfg);
|
| 39 | + cfg.suffix.acquisition = '0p75mmEvTr2p18'; |
36 | 40 |
|
37 |
| - cfg.pacedByTriggers.do = true; |
| 41 | + cfg.pacedByTriggers.do = false; |
38 | 42 |
|
39 | 43 | %% Experiment Design
|
40 | 44 |
|
41 |
| - % cfg.design.motionType = 'translation'; |
42 |
| - % cfg.design.motionType = 'radial'; |
| 45 | + % switching this on to MT or MT/MST with use: |
| 46 | + % - MT: translational motion on the whole screen |
| 47 | + % - alternates static and motion (left or right) blocks |
| 48 | + % - MST: radial motion centered in a circle aperture that is on the opposite |
| 49 | + % side of the screen relative to the fixation |
| 50 | + % - alternates fixaton left and fixation right |
| 51 | + cfg.design.localizer = 'MT'; |
| 52 | + % cfg.design.localizer = 'MT_MST'; |
| 53 | + |
43 | 54 | cfg.design.motionType = 'translation';
|
44 | 55 | cfg.design.motionDirections = [0 0 180 180];
|
45 | 56 | cfg.design.names = {'static'; 'motion'};
|
46 |
| - cfg.design.nbRepetitions = 8; |
| 57 | + |
| 58 | + cfg.design.nbRepetitions = 12; |
47 | 59 | cfg.design.nbEventsPerBlock = 12; % DO NOT CHANGE
|
48 | 60 |
|
49 | 61 | %% Timing
|
|
54 | 66 | % IBI
|
55 | 67 | % block length = (cfg.eventDuration + cfg.ISI) * cfg.design.nbEventsPerBlock
|
56 | 68 |
|
57 |
| - cfg.timing.eventDuration = 0.8; % second |
| 69 | + cfg.timing.eventDuration = 0.79; % second |
58 | 70 |
|
59 | 71 | % Time between blocs in secs
|
60 | 72 | cfg.timing.IBI = 0;
|
|
69 | 81 | if cfg.pacedByTriggers.do
|
70 | 82 |
|
71 | 83 | cfg.pacedByTriggers.quietMode = true;
|
72 |
| - cfg.pacedByTriggers.nbTriggers = 1; |
| 84 | + cfg.pacedByTriggers.nbTriggers = 5; |
73 | 85 |
|
74 | 86 | cfg.timing.eventDuration = cfg.mri.repetitionTime / 2 - 0.04; % second
|
75 | 87 |
|
|
81 | 93 | cfg.timing.onsetDelay = 0;
|
82 | 94 | % Number of seconds after the end all the stimuli before ending the run
|
83 | 95 | cfg.timing.endDelay = 2;
|
| 96 | + |
84 | 97 | end
|
85 | 98 |
|
86 | 99 | %% Visual Stimulation
|
|
92 | 105 | % Number of dots per visual angle square.
|
93 | 106 | cfg.dot.density = 1;
|
94 | 107 | % Dot life time in seconds
|
95 |
| - cfg.dot.lifeTime = 10; |
| 108 | + cfg.dot.lifeTime = 0.4; |
96 | 109 | % proportion of dots killed per frame
|
97 | 110 | cfg.dot.proportionKilledPerFrame = 0;
|
98 | 111 | % Dot Size (dot width) in visual angles.
|
99 |
| - cfg.dot.size = .1; |
| 112 | + cfg.dot.size = .2; |
100 | 113 | cfg.dot.color = cfg.color.white;
|
101 | 114 |
|
102 | 115 | % Diameter/length of side of aperture in Visual angles
|
|
115 | 128 | cfg.fixation.type = 'cross';
|
116 | 129 | cfg.fixation.colorTarget = cfg.color.red;
|
117 | 130 | cfg.fixation.color = cfg.color.white;
|
118 |
| - cfg.fixation.width = .5; |
| 131 | + cfg.fixation.width = .25; |
119 | 132 | cfg.fixation.lineWidthPix = 3;
|
120 | 133 | cfg.fixation.xDisplacement = 0;
|
121 | 134 | cfg.fixation.yDisplacement = 0;
|
122 | 135 |
|
123 | 136 | cfg.target.maxNbPerBlock = 1;
|
124 |
| - cfg.target.duration = 0.05; % In secs |
| 137 | + cfg.target.duration = 0.1; % In secs |
125 | 138 |
|
126 |
| - cfg.extraColumns = {'direction', 'speed', 'target', 'event', 'block', 'keyName'}; |
| 139 | + cfg.extraColumns = { ... |
| 140 | + 'direction', ... |
| 141 | + 'speedDegVA', ... |
| 142 | + 'target', ... |
| 143 | + 'event', ... |
| 144 | + 'block', ... |
| 145 | + 'keyName', ... |
| 146 | + 'fixationPosition', ... |
| 147 | + 'aperturePosition'}; |
| 148 | + |
| 149 | + %% orverrireds the relevant fields in case we use the MT / MST localizer |
| 150 | + cfg = setParametersMtMst(cfg); |
127 | 151 |
|
128 | 152 | end
|
129 | 153 |
|
130 | 154 | function cfg = setKeyboards(cfg)
|
131 | 155 | cfg.keyboard.escapeKey = 'ESCAPE';
|
132 | 156 | cfg.keyboard.responseKey = { ...
|
133 |
| - 'r', 'g', 'y', 'b', ... |
134 |
| - 'd', 'n', 'z', 'e', ... |
135 |
| - 't'}; % dnze rgyb |
| 157 | + 'r', 'g', 'y', 'b', ... |
| 158 | + 'd', 'n', 'z', 'e', ... |
| 159 | + 't'}; |
136 | 160 | cfg.keyboard.keyboard = [];
|
137 | 161 | cfg.keyboard.responseBox = [];
|
138 | 162 |
|
|
172 | 196 | cfg.screen.monitorWidth = 25;
|
173 | 197 | cfg.screen.monitorDistance = 95;
|
174 | 198 | end
|
| 199 | + |
| 200 | +end |
| 201 | + |
| 202 | +function cfg = setParametersMtMst(cfg) |
| 203 | + |
| 204 | + if isfield(cfg.design, 'localizer') && strcmpi(cfg.design.localizer, 'MT_MST') |
| 205 | + |
| 206 | + cfg.task.name = 'mt mst localizer'; |
| 207 | + |
| 208 | + cfg.design.motionType = 'radial'; |
| 209 | + cfg.design.motionDirections = [666 666 -666 -666]; |
| 210 | + cfg.design.names = {'fixation_right'; 'fixation_left'}; |
| 211 | + cfg.design.xDisplacementFixation = 7; |
| 212 | + cfg.design.xDisplacementAperture = 3; |
| 213 | + |
| 214 | + cfg.timing.IBI = 3.6; |
| 215 | + |
| 216 | + % reexpress those in terms of repetition time |
| 217 | + if cfg.pacedByTriggers.do |
| 218 | + |
| 219 | + cfg.timing.IBI = 2; |
| 220 | + |
| 221 | + end |
| 222 | + |
| 223 | + cfg.aperture.type = 'circle'; |
| 224 | + cfg.aperture.width = 7; % if left empty it will take the screen height |
| 225 | + cfg.aperture.xPos = cfg.design.xDisplacementAperture; |
| 226 | + |
| 227 | + end |
| 228 | + |
175 | 229 | end
|
0 commit comments