|
| 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')), '..', ... |
| 15 | + 'output'); |
14 | 16 |
|
15 | 17 | %% Debug mode settings |
16 | 18 |
|
17 | 19 | cfg.debug.do = false; % To test the script out of the scanner, skip PTB sync |
18 | 20 | cfg.debug.smallWin = false; % To test on a part of the screen, change to 1 |
19 | | - cfg.debug.transpWin = false; % To test with trasparent full size screen |
| 21 | + cfg.debug.transpWin = true; % To test with trasparent full size screen |
20 | 22 |
|
21 | 23 | cfg.verbose = false; |
22 | 24 |
|
23 | 25 | %% Engine parameters |
24 | 26 |
|
25 | 27 | cfg.testingDevice = 'mri'; |
26 | | - cfg.eyeTracker.do = true; |
| 28 | + cfg.eyeTracker.do = false; |
27 | 29 | cfg.audio.do = false; |
28 | 30 |
|
29 | 31 | cfg = setMonitor(cfg); |
|
34 | 36 | % MRI settings |
35 | 37 | cfg = setMRI(cfg); |
36 | 38 |
|
37 | | - cfg.pacedByTriggers.do = true; |
| 39 | + cfg.pacedByTriggers.do = false; |
38 | 40 |
|
39 | 41 | %% Experiment Design |
40 | 42 |
|
41 | | - % cfg.design.motionType = 'translation'; |
| 43 | + % cfg.design.localizer = 'MT_MST'; |
| 44 | + |
42 | 45 | % cfg.design.motionType = 'radial'; |
43 | 46 | cfg.design.motionType = 'translation'; |
| 47 | + |
44 | 48 | cfg.design.motionDirections = [0 0 180 180]; |
45 | 49 | cfg.design.names = {'static'; 'motion'}; |
46 | 50 | cfg.design.nbRepetitions = 8; |
47 | 51 | cfg.design.nbEventsPerBlock = 12; % DO NOT CHANGE |
48 | 52 |
|
| 53 | + if isfield(cfg.design, 'localizer') && strcmpi(cfg.design.localizer, 'MT_MST') |
| 54 | + cfg.design.names = {'fixation_right'; 'fixation_left'}; |
| 55 | + end |
| 56 | + |
49 | 57 | %% Timing |
50 | 58 |
|
51 | 59 | % FOR 7T: if you want to create localizers on the fly, the following must be |
|
65 | 73 | % Number of seconds after the end all the stimuli before ending the run |
66 | 74 | cfg.timing.endDelay = 3.6; |
67 | 75 |
|
| 76 | + if isfield(cfg.design, 'localizer') && strcmpi(cfg.design.localizer, 'MT_MST') |
| 77 | + cfg.timing.IBI = 3.6; |
| 78 | + end |
| 79 | + |
68 | 80 | % reexpress those in terms of repetition time |
69 | 81 | if cfg.pacedByTriggers.do |
70 | 82 |
|
|
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 | + |
| 97 | + if isfield(cfg.design, 'localizer') && strcmpi(cfg.design.localizer, 'MT_MST') |
| 98 | + cfg.timing.IBI = 2; |
| 99 | + end |
| 100 | + |
84 | 101 | end |
85 | 102 |
|
86 | 103 | %% Visual Stimulation |
|
92 | 109 | % Number of dots per visual angle square. |
93 | 110 | cfg.dot.density = 1; |
94 | 111 | % Dot life time in seconds |
95 | | - cfg.dot.lifeTime = 10; |
| 112 | + cfg.dot.lifeTime = .15; |
96 | 113 | % proportion of dots killed per frame |
97 | | - cfg.dot.proportionKilledPerFrame = 0; |
| 114 | + cfg.dot.proportionKilledPerFrame = 0.005; |
98 | 115 | % Dot Size (dot width) in visual angles. |
99 | | - cfg.dot.size = .1; |
| 116 | + cfg.dot.size = .2; |
100 | 117 | cfg.dot.color = cfg.color.white; |
101 | 118 |
|
102 | 119 | % Diameter/length of side of aperture in Visual angles |
103 | 120 | cfg.aperture.type = 'none'; |
104 | 121 | cfg.aperture.width = []; % if left empty it will take the screen height |
105 | 122 | cfg.aperture.xPos = 0; |
106 | 123 |
|
| 124 | + if isfield(cfg.design, 'localizer') && strcmpi(cfg.design.localizer, 'MT_MST') |
| 125 | + cfg.aperture.type = 'circle'; |
| 126 | + cfg.aperture.width = 7; % if left empty it will take the screen height |
| 127 | + cfg.aperture.xPos = 7; |
| 128 | + end |
| 129 | + |
107 | 130 | %% Task(s) |
108 | 131 |
|
109 | 132 | cfg.task.name = 'visual localizer'; |
| 133 | + if isfield(cfg.design, 'localizer') && strcmpi(cfg.design.localizer, 'MT_MST') |
| 134 | + cfg.task.name = 'mt mst localizer'; |
| 135 | + end |
110 | 136 |
|
111 | 137 | % Instruction |
112 | 138 | cfg.task.instruction = '1-Detect the RED fixation cross\n \n\n'; |
|
115 | 141 | cfg.fixation.type = 'cross'; |
116 | 142 | cfg.fixation.colorTarget = cfg.color.red; |
117 | 143 | cfg.fixation.color = cfg.color.white; |
118 | | - cfg.fixation.width = .5; |
| 144 | + cfg.fixation.width = .25; |
119 | 145 | cfg.fixation.lineWidthPix = 3; |
120 | 146 | cfg.fixation.xDisplacement = 0; |
121 | 147 | cfg.fixation.yDisplacement = 0; |
122 | 148 |
|
123 | 149 | cfg.target.maxNbPerBlock = 1; |
124 | 150 | cfg.target.duration = 0.05; % In secs |
125 | 151 |
|
126 | | - cfg.extraColumns = {'direction', 'speed', 'target', 'event', 'block', 'keyName'}; |
| 152 | + cfg.extraColumns = { ... |
| 153 | + 'direction', ... |
| 154 | + 'speed', ... |
| 155 | + 'target', ... |
| 156 | + 'event', ... |
| 157 | + 'block', ... |
| 158 | + 'keyName', ... |
| 159 | + 'fixationPosition', ... |
| 160 | + 'aperturePosition'}; |
127 | 161 |
|
128 | 162 | end |
129 | 163 |
|
130 | 164 | function cfg = setKeyboards(cfg) |
131 | 165 | cfg.keyboard.escapeKey = 'ESCAPE'; |
132 | 166 | cfg.keyboard.responseKey = { ... |
133 | | - 'r', 'g', 'y', 'b', ... |
134 | | - 'd', 'n', 'z', 'e', ... |
135 | | - 't'}; % dnze rgyb |
| 167 | + 'r', 'g', 'y', 'b', ... |
| 168 | + 'd', 'n', 'z', 'e', ... |
| 169 | + 't'}; |
136 | 170 | cfg.keyboard.keyboard = []; |
137 | 171 | cfg.keyboard.responseBox = []; |
138 | 172 |
|
|
145 | 179 | function cfg = setMRI(cfg) |
146 | 180 | % letter sent by the trigger to sync stimulation and volume acquisition |
147 | 181 | cfg.mri.triggerKey = 't'; |
148 | | - cfg.mri.triggerNb = 5; |
| 182 | + cfg.mri.triggerNb = 1; |
149 | 183 |
|
150 | 184 | cfg.mri.repetitionTime = 1.8; |
151 | 185 |
|
|
0 commit comments