Skip to content

Commit 465134c

Browse files
Merge pull request #93 from marcobarilari/marco_static-dots-not-changing
Make optional to have a static block where the dots never change position
2 parents 2f68c31 + cfb0944 commit 465134c

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-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: 15 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,19 @@
8181

8282
drawFixation(thisFixation);
8383

84-
Screen('DrawingFinished', cfg.screen.win);
84+
if cfg.dot.staticReSeed && strcmpi(thisEvent.trial_type, 'static')
8585

86-
vbl = Screen('Flip', cfg.screen.win, vbl + cfg.screen.ifi);
86+
dotTexture('draw', cfg, thisEvent);
87+
88+
apertureTexture('draw', cfg, thisEvent);
89+
90+
else
91+
92+
Screen('DrawingFinished', cfg.screen.win);
93+
94+
vbl = Screen('Flip', cfg.screen.win, vbl + cfg.screen.ifi);
95+
96+
end
8797

8898
duration = vbl - onset;
8999

0 commit comments

Comments
 (0)