Skip to content

Commit 6530533

Browse files
committed
mh fix
1 parent 677a7af commit 6530533

11 files changed

Lines changed: 96 additions & 92 deletions

File tree

initEnv.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ function initEnv()
5959

6060
if numel(dir(libDirectory)) <= 2 % Means that the external is empty
6161
error(['Git submodules are not cloned!', ...
62-
'Try this in your terminal:', ...
63-
' git submodule update --recursive ']);
62+
'Try this in your terminal:', ...
63+
' git submodule update --recursive ']);
6464
else
6565
addDependencies();
6666
end

src/driftingBars.m

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,32 +37,32 @@ function driftingBars(debug, stim, emul)
3737

3838
cfg.debug.do = debug;
3939

40-
4140
cfg.testingDevice = 'mri';
4241
if emul
4342
cfg.testingDevice = 'pc';
4443
end
4544

4645
cfg.extraColumns.bar_angle = struct( ...
47-
'length', 1, ...
48-
'bids', struct( ...
49-
'LongName', 'bar angle', ...
50-
'Description', '', ...
51-
'Units', 'degrees'));
46+
'length', 1, ...
47+
'bids', struct( ...
48+
'LongName', 'bar angle', ...
49+
'Description', '', ...
50+
'Units', 'degrees'));
5251

5352
cfg.extraColumns.bar_width = struct( ...
54-
'length', 1, ...
55-
'bids', struct( ...
56-
'LongName', 'width of the bar', ...
57-
'Description', '', ...
58-
'Units', 'degrees'));
53+
'length', 1, ...
54+
'bids', struct( ...
55+
'LongName', 'width of the bar', ...
56+
'Description', '', ...
57+
'Units', 'degrees'));
5958

6059
cfg.extraColumns.bar_position = struct( ...
61-
'length', 1, ...
62-
'bids', struct( ...
63-
'LongName', '', ...
64-
'Description', 'bar position with respoect to the fixation cross', ...
65-
'Units', 'degrees'));
60+
'length', 1, ...
61+
'bids', struct( ...
62+
'LongName', '', ...
63+
'Description', ...
64+
'bar position wrt fixation cross', ...
65+
'Units', 'degrees'));
6666

6767
[cfg] = setParameters(cfg);
6868

src/eccen.m

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,25 @@ function eccen(debug, direc, stim, emul)
4848
cfg.testingDevice = 'pc';
4949
end
5050

51+
defaultStruct = struct('LongName', '', ...
52+
'Units', '');
53+
5154
cfg.extraColumns.ring_inner_rim = struct( ...
52-
'length', 1, ...
53-
'bids', struct( ...
54-
'LongName', 'position of the inner rim of the ring', ...
55-
'Units', 'degrees of visual angles'));
55+
'length', 1, ...
56+
'bids', defaultStruct);
57+
cfg.extraColumns.ring_inner_rim.bids.LongName = 'position of ring inner rim';
58+
cfg.extraColumns.ring_inner_rim.bids.Units = 'degrees of visual angles';
59+
5660
cfg.extraColumns.ring_outer_rim = struct( ...
57-
'length', 1, ...
58-
'bids', struct( ...
59-
'LongName', 'position of the outer rim of the ring', ...
60-
'Units', 'degrees of visual angles'));
61+
'length', 1, ...
62+
'bids', defaultStruct);
63+
cfg.extraColumns.ring_outer_rim.bids.LongName = 'position of ring outer rim';
64+
cfg.extraColumns.ring_outer_rim.bids.Units = 'degrees of visual angles';
6165

6266
[cfg] = setParameters(cfg);
6367

6468
%% Run the experiment
65-
[data, cfg] = retinotopicMapping(cfg);
69+
[~, ~] = retinotopicMapping(cfg);
6670

6771
% plotResults(data, expParameters);
6872

src/polar.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ function polar(debug, direc, stim, emul)
4848
end
4949

5050
cfg.extraColumns.angle = struct( ...
51-
'length', 1, ...
52-
'bids', struct( ...
53-
'LongName', 'position of the center of the wedge', ...
54-
'Units', 'degrees'));
51+
'length', 1, ...
52+
'bids', struct( ...
53+
'LongName', 'position of wedge center', ...
54+
'Units', 'degrees'));
5555

5656
cfg.extraColumns.wedge_angle = struct( ...
57-
'length', 1, ...
58-
'bids', struct( ...
59-
'LongName', 'angular width of the wedge', ...
60-
'Units', 'degrees'));
57+
'length', 1, ...
58+
'bids', struct( ...
59+
'LongName', 'wedge angular width', ...
60+
'Units', 'degrees'));
6161

6262
[cfg] = setParameters(cfg);
6363

src/setParameters.m

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
cfg.stimWidth = 1024;
4545

4646
% will magnify the stim until it reaches that width in pixel
47-
cfg.stimDestWidth = 800;
47+
cfg.stimDestWidth = 800;
4848

4949
cfg = setDotsParameters(cfg);
5050

@@ -68,37 +68,37 @@
6868
cfg.audio.do = false;
6969

7070
cfg.extraColumns.x_target_pos = struct( ...
71-
'length', 1, ...
72-
'bids', struct( ...
73-
'LongName', 'x position of the the target', ...
74-
'Units', 'degrees of visual angles'));
71+
'length', 1, ...
72+
'bids', struct( ...
73+
'LongName', 'target x position', ...
74+
'Units', 'degrees of visual angles'));
7575

7676
cfg.extraColumns.y_target_pos = struct( ...
77-
'length', 1, ...
78-
'bids', struct( ...
79-
'LongName', 'y position of the the target', ...
80-
'Units', 'degrees of visual angles'));
77+
'length', 1, ...
78+
'bids', struct( ...
79+
'LongName', 'target y position', ...
80+
'Units', 'degrees of visual angles'));
8181

8282
cfg.extraColumns.target_width = struct( ...
83-
'length', 1, ...
84-
'bids', struct( ...
85-
'LongName', 'diameter of the the target', ...
86-
'Units', 'degrees of visual angles'));
87-
83+
'length', 1, ...
84+
'bids', struct( ...
85+
'LongName', 'target diameter', ...
86+
'Units', 'degrees of visual angles'));
87+
8888
cfg.extraColumns.keyName = struct( ...
89-
'length', 1, ...
90-
'bids', struct( ...
91-
'LongName', 'key pressed', ...
92-
'Units', ''));
89+
'length', 1, ...
90+
'bids', struct( ...
91+
'LongName', 'key pressed', ...
92+
'Units', ''));
9393

9494
end
9595

9696
function [cfg] = setKeyboards(cfg)
9797
cfg.keyboard.escapeKey = 'ESCAPE';
9898
cfg.keyboard.responseKey = { ...
99-
'r', 'g', 'y', 'b', ...
100-
'd', 'n', 'z', 'e', ...
101-
't'};
99+
'r', 'g', 'y', 'b', ...
100+
'd', 'n', 'z', 'e', ...
101+
't'};
102102
cfg.keyboard.keyboard = [];
103103
cfg.keyboard.responseBox = [];
104104

@@ -116,7 +116,7 @@
116116

117117
cfg.bids.MRI.Instructions = 'Press the button everytime a red dot appears!';
118118
cfg.bids.MRI.TaskDescription = [];
119-
119+
120120
cfg.pacedByTriggers.do = false;
121121

122122
end
@@ -141,7 +141,7 @@
141141
end
142142

143143
% Resolution [width height refresh_rate]
144-
%cfg.screen.resolution = {1024, 768, []};
144+
% cfg.screen.resolution = {1024, 768, []};
145145

146146
% to use to draw the actual field of view of the participant
147147
% [width height]

src/subfun/drawTarget.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
[X, Y] = pol2cart(target.rndAngle / 180 * pi, (outerRimPix / 2 + innerRimPix / 2) / 2);
5252
elseif ~cfg.target.central && strcmp(cfg.aperture.type, 'wedge')
5353
[X, Y] = pol2cart((90 + thisEvent.angle + cfg.aperture.width / 2) / ...
54-
180 * pi, target.rndScale);
54+
180 * pi, target.rndScale);
5555
end
5656

5757
target.x_target_pos = X;
@@ -63,11 +63,11 @@
6363

6464
% Draw event
6565
Screen('FillOval', win, ...
66-
cfg.target.color, ...
67-
[X - target_width / 2 ...
68-
Y - target_width / 2 ...
69-
X + target_width / 2 ...
70-
Y + target_width / 2]);
66+
cfg.target.color, ...
67+
[X - target_width / 2 ...
68+
Y - target_width / 2 ...
69+
X + target_width / 2 ...
70+
Y + target_width / 2]);
7171

7272
else
7373

src/subfun/feedbackScreen.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
for iTarget = 1:numel(isTarget)
2222

2323
respWin = all([ ...
24-
data(:, 1) >= data(isTarget(iTarget), 1), ...
25-
data(:, 1) < (data(isTarget(iTarget), 1) + cfg.respWin)], 2);
24+
data(:, 1) >= data(isTarget(iTarget), 1), ...
25+
data(:, 1) < (data(isTarget(iTarget), 1) + cfg.respWin)], 2);
2626

2727
if any(all([respWin IsResp], 2))
2828
hit = hit + 1;
@@ -37,13 +37,13 @@
3737
Screen('FillRect', cfg.screen.win, cfg.color.background, cfg.screen.winRect);
3838

3939
DrawFormattedText(cfg.screen.win, sprintf(cfg.hit, hit, numel(isTarget)), ...
40-
'center', cfg.screen.winRect(4) / 4, [0 255 0]);
40+
'center', cfg.screen.winRect(4) / 4, [0 255 0]);
4141

4242
DrawFormattedText(cfg.screen.win, sprintf(cfg.miss, miss, numel(isTarget)), ...
43-
'center', cfg.screen.winRect(4) / 2, [255 0 0]);
43+
'center', cfg.screen.winRect(4) / 2, [255 0 0]);
4444

4545
DrawFormattedText(cfg.screen.win, sprintf(cfg.fA, fa), ...
46-
'center', cfg.screen.winRect(4) * 3 / 4, [255 0 0]);
46+
'center', cfg.screen.winRect(4) * 3 / 4, [255 0 0]);
4747

4848
Screen('Flip', cfg.screen.win);
4949

src/subfun/main_func/barsMapping.m

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function barsMapping(cfg)
138138
end
139139

140140
if thisEvent.stim > size(cfg.stimulus, ...
141-
length(size(cfg.stimulus)))
141+
length(size(cfg.stimulus)))
142142
thisEvent.stim = 1;
143143
end
144144

@@ -167,9 +167,9 @@ function barsMapping(cfg)
167167

168168
% draw the background texture centered on screen
169169
Screen('DrawTexture', cfg.screen.win, bgdTextures(thisEvent.stim), ...
170-
cfg.stimRect, ...
171-
CenterRect(cfg.destinationRect, cfg.screen.winRect), ...
172-
bgdAngle + thisEvent.condition - 90);
170+
cfg.stimRect, ...
171+
CenterRect(cfg.destinationRect, cfg.screen.winRect), ...
172+
bgdAngle + thisEvent.condition - 90);
173173

174174
end
175175

@@ -198,8 +198,8 @@ function barsMapping(cfg)
198198
barInfo.bar_width = cfg.aperture.width;
199199

200200
[barInfo, isOffset] = saveOnOffset( ...
201-
isOffset, ...
202-
barInfo, cfg, rft);
201+
isOffset, ...
202+
barInfo, cfg, rft);
203203

204204
[barInfo, isOnset] = getOnset(isOnset, barInfo, cfg, rft);
205205
barInfo.experimentStarted = true;
@@ -211,16 +211,16 @@ function barsMapping(cfg)
211211

212212
target = getOnset(target.isOnset, target, cfg, rft);
213213
target = saveOnOffset( ...
214-
target.isOffset, ...
215-
target, cfg, rft);
214+
target.isOffset, ...
215+
target, cfg, rft);
216216
% -------------------------------------------------------------------------------
217217

218218
collectAndSaveResponses(cfg, logFile, cfg.experimentStart);
219219

220220
%% Determine current volume
221221
thisEvent.previousVolume = thisEvent.volume;
222222
thisEvent.volume = floor((thisEvent.time - trialOnset) / ...
223-
cfg.mri.repetitionTime) + 1;
223+
cfg.mri.repetitionTime) + 1;
224224

225225
end
226226

@@ -249,8 +249,8 @@ function barsMapping(cfg)
249249
createJson(cfg, cfg);
250250

251251
output = bids.util.tsvread( ...
252-
fullfile(cfg.dir.outputSubject, cfg.fileName.modality, ...
253-
cfg.fileName.events));
252+
fullfile(cfg.dir.outputSubject, cfg.fileName.modality, ...
253+
cfg.fileName.events));
254254

255255
disp(output);
256256

@@ -299,7 +299,7 @@ function barsMapping(cfg)
299299
% dots are displayed on a square
300300
cfg.dot.matrixWidth = cfg.destinationRect(3);
301301
cfg.dot.number = round(cfg.dot.density * ...
302-
(cfg.dot.matrixWidth / cfg.screen.ppd)^2);
302+
(cfg.dot.matrixWidth / cfg.screen.ppd)^2);
303303

304304
end
305305

src/subfun/main_func/retinotopicMapping.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@
107107
thisEvent.direction = rand * 360;
108108

109109
dots = initDots(cfg, thisEvent);
110-
110+
111111
elseif thisEvent.refresh == 60
112112

113113
thisEvent.refresh = 0;
114-
114+
115115
end
116116

117117
[dots] = updateDots(dots, cfg);
@@ -159,9 +159,9 @@
159159
sineRotate = cos(thisEvent.time) * cfg.sineRotation;
160160

161161
Screen('DrawTexture', cfg.screen.win, bgdTextures(thisEvent.frame), ...
162-
cfg.stimRect, ...
163-
CenterRect(cfg.destinationRect, cfg.screen.winRect), ...
164-
bgdAngle + sineRotate);
162+
cfg.stimRect, ...
163+
CenterRect(cfg.destinationRect, cfg.screen.winRect), ...
164+
bgdAngle + sineRotate);
165165

166166
end
167167

@@ -209,8 +209,8 @@
209209
createBoldJson(cfg, cfg);
210210

211211
output = bids.util.tsvread( ...
212-
fullfile(cfg.dir.outputSubject, cfg.fileName.modality, ...
213-
cfg.fileName.events));
212+
fullfile(cfg.dir.outputSubject, cfg.fileName.modality, ...
213+
cfg.fileName.events));
214214

215215
disp(output);
216216

@@ -259,7 +259,7 @@
259259
% dots are displayed on a square
260260
cfg.dot.matrixWidth = cfg.destinationRect(3);
261261
cfg.dot.number = round(cfg.dot.density * ...
262-
(cfg.dot.matrixWidth / cfg.screen.ppd)^2);
262+
(cfg.dot.matrixWidth / cfg.screen.ppd)^2);
263263

264264
end
265265

src/subfun/stimulusGeneration/generateStimulus.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function generateStimulus(cfg)
6969
outputDir = fullfile(fileparts(mfilename('fullpath')), '..', '..', 'input');
7070

7171
save(fullfile(outputDir, [outputFile '.mat']), ...
72-
'stimulus', 'stimFrames');
72+
'stimulus', 'stimFrames');
7373

7474
if pringFig
7575
for iStim = 1:size(stimulus, 3)

0 commit comments

Comments
 (0)