Skip to content

Commit a869121

Browse files
committed
add possibility for static dots with fix position for the entire block
1 parent 36df0dd commit a869121

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

setParameters.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
cfg = setMRI(cfg);
3939
% cfg.suffix.acquisition = '';
4040

41-
cfg.pacedByTriggers.do = true;
41+
cfg.pacedByTriggers.do = false;
4242

4343
%% Experiment Design
4444

@@ -115,6 +115,8 @@
115115
% Dot Size (dot width) in visual angles.
116116
cfg.dot.size = .2;
117117
cfg.dot.color = cfg.color.white;
118+
% Static dots should change position at each event or not
119+
cfg.dot.staticReSeed = true;
118120

119121
% Diameter/length of side of aperture in Visual angles
120122
cfg.aperture.type = 'none';

subfun/doDotMo.m

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242

4343
%% make textures
4444

45-
if strcmp(cfg.design.localizer, 'MT_MST') && ...
46-
strcmpi(thisEvent.trial_type, 'static') && ...
47-
~mod(iEvent, 2)
45+
if cfg.dot.staticReSeed && ...
46+
strcmpi(thisEvent.trial_type, 'static') && ...
47+
iEvent ~= 1
4848

4949
else
5050

@@ -81,9 +81,20 @@
8181

8282
drawFixation(thisFixation);
8383

84-
Screen('DrawingFinished', cfg.screen.win);
8584

86-
vbl = Screen('Flip', cfg.screen.win, vbl + cfg.screen.ifi);
85+
if cfg.dot.staticReSeed && strcmpi(thisEvent.trial_type, 'static')
86+
87+
dotTexture('draw', cfg, thisEvent);
88+
89+
apertureTexture('draw', cfg, thisEvent);
90+
91+
else
92+
93+
Screen('DrawingFinished', cfg.screen.win);
94+
95+
vbl = Screen('Flip', cfg.screen.win, vbl + cfg.screen.ifi);
96+
97+
end
8798

8899
duration = vbl - onset;
89100

0 commit comments

Comments
 (0)