Skip to content

Commit ecd99ad

Browse files
committed
mh autofix
1 parent e47b8d6 commit ecd99ad

File tree

3 files changed

+29
-30
lines changed

3 files changed

+29
-30
lines changed

setParameters.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,23 @@
3434

3535
%% Experiment Design
3636

37-
% cfg.design.motionType = 'translation';
38-
% cfg.design.motionType = 'radial';
37+
% cfg.design.motionType = 'translation';
38+
% cfg.design.motionType = 'radial';
3939
cfg.design.motionType = 'translation';
4040
cfg.design.names = {'static'; 'motion'};
4141
cfg.design.nbRepetitions = 4;
4242
cfg.design.nbEventsPerBlock = 12; % DO NOT CHANGE
4343

4444
%% Timing
45-
45+
4646
% FOR 7T: if you want to create localizers on the fly, the following must be
4747
% multiples of the scanneryour sequence TR
48-
%
48+
%
4949
% IBI
5050
% block length = (cfg.eventDuration + cfg.ISI) * cfg.design.nbEventsPerBlock
5151

5252
% Time between blocs in secs
53-
cfg.IBI = 1.8*3; % 8;
53+
cfg.IBI = 1.8 * 3; % 8;
5454
% Time between events in secs
5555
cfg.ISI = 0.1;
5656
% Number of seconds before the motion stimuli are presented
@@ -59,7 +59,7 @@
5959
cfg.endDelay = .1;
6060

6161
cfg.eventDuration = 0.8; % second
62-
62+
6363
%% Visual Stimulation
6464

6565
% Speed in visual angles / second

subfun/expDesign.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
% Set variables here for a dummy test of this function
5959
if nargin < 1 || isempty(cfg)
60-
% cfg.design.motionType = 'translation';
60+
% cfg.design.motionType = 'translation';
6161
cfg.design.motionType = 'radial';
6262
cfg.design.names = {'static'; 'motion'};
6363
cfg.design.nbRepetitions = 4;
@@ -184,20 +184,20 @@
184184
end
185185

186186
function [MOTION_DIRECTIONS, STATIC_DIRECTIONS] = getDirectionBaseVectors(cfg)
187-
187+
188188
% CONSTANTS
189189
% Set directions for static and motion condition
190-
190+
191191
STATIC_DIRECTIONS = [-1 -1 -1 -1];
192-
192+
193193
switch cfg.design.motionType
194194
case 'translation'
195195
MOTION_DIRECTIONS = [0 90 180 270];
196196
case 'radial'
197197
STATIC_DIRECTIONS = [666 -666 666 -666];
198198
MOTION_DIRECTIONS = [666 -666 666 -666];
199-
end
200-
199+
end
200+
201201
end
202202

203203
function [nbBlocks, nbRepet, nbEventsBlock, maxTargBlock] = getInput(cfg)
@@ -271,7 +271,7 @@ function diplayDesign(cfg, displayFigs)
271271
title('Fixation Targets position distribution');
272272

273273
figure(2);
274-
274+
275275
[motionDirections] = getDirectionBaseVectors(cfg);
276276
motionDirections = unique(motionDirections);
277277

visualLocTanslational.m

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
[cfg] = initPTB(cfg);
3535

3636
cfg.dot.matrixWidth = cfg.screen.winHeight;
37-
37+
3838
% Convert some values from degrees to pixels
3939
cfg.dot = degToPix('size', cfg.dot, cfg);
4040
cfg.dot = degToPix('speed', cfg.dot, cfg);
@@ -56,7 +56,7 @@
5656
% Prepare for the output logfiles with all
5757
logFile.extraColumns = cfg.extraColumns;
5858
logFile = saveEventsFile('open', cfg, logFile);
59-
59+
6060
% prepare textures
6161
cfg = apertureTexture('init', cfg);
6262
cfg = dotTexture('init', cfg);
@@ -119,9 +119,9 @@
119119
% saving in the tsv file
120120
responseEvents = getResponse('check', cfg.keyboard.responseBox, cfg, ...
121121
getOnlyPress);
122-
122+
123123
if isfield(responseEvents(1), 'onset') && ~isempty(responseEvents(1).onset)
124-
124+
125125
for iResp = 1:size(responseEvents, 1)
126126
responseEvents(iResp).onset = ...
127127
responseEvents(iResp).onset - cfg.experimentStart;
@@ -134,28 +134,28 @@
134134
responseEvents(iResp).trial_type = 'trigger';
135135
end
136136
end
137-
137+
138138
responseEvents(1).fileID = logFile.fileID;
139139
responseEvents(1).extraColumns = logFile.extraColumns;
140140
saveEventsFile('save', cfg, responseEvents);
141-
141+
142142
end
143-
143+
144144
% wait for the inter-stimulus interval
145145
WaitSecs(cfg.ISI);
146146

147147
end
148-
148+
149149
eyeTracker('StopRecordings', cfg);
150-
150+
151151
WaitSecs(cfg.IBI);
152-
152+
153153
% trigger monitoring
154154
triggerEvents = getResponse('check', cfg.keyboard.responseBox, cfg, ...
155155
getOnlyPress);
156-
156+
157157
if isfield(triggerEvents(1), 'onset') && ~isempty(triggerEvents(1).onset)
158-
158+
159159
for iResp = 1:size(triggerEvents, 1)
160160
triggerEvents(iResp).onset = ...
161161
triggerEvents(iResp).onset - cfg.experimentStart;
@@ -168,13 +168,12 @@
168168
triggerEvents(iResp).trial_type = 'trigger-baseline';
169169
end
170170
end
171-
171+
172172
triggerEvents(1).fileID = logFile.fileID;
173173
triggerEvents(1).extraColumns = logFile.extraColumns;
174174
saveEventsFile('save', cfg, triggerEvents);
175-
176-
end
177175

176+
end
178177

179178
end
180179

@@ -190,8 +189,8 @@
190189
getResponse('release', cfg.keyboard.responseBox);
191190

192191
eyeTracker('Shutdown', cfg);
193-
194-
createBoldJson(cfg, cfg)
192+
193+
createBoldJson(cfg, cfg);
195194

196195
farewellScreen(cfg);
197196

0 commit comments

Comments
 (0)