Skip to content

Commit cfcf9fa

Browse files
committed
add condition to not redraw static dots in a different position within one event
1 parent 9b5f95b commit cfcf9fa

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

subfun/doDotMo.m

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
% (C) Copyright 2018 Mohamed Rezk
22
% (C) Copyright 2020 CPP visual motion localizer developpers
33

4-
function [onset, duration] = doDotMo(cfg, thisEvent, thisFixation)
4+
function [onset, duration] = doDotMo(cfg, thisEvent, thisFixation, iEvent)
55
% Draws the stimulation of static/moving in 4 directions dots or static
66
%
77
% DIRECTIONS
@@ -30,6 +30,7 @@
3030

3131
while framesLeft
3232

33+
3334
[dots] = updateDots(dots, cfg);
3435

3536
%% Center the dots
@@ -40,15 +41,21 @@
4041
thisEvent.dot.positions = (dots.positions - cfg.dot.matrixWidth / 2)';
4142

4243
%% make textures
43-
44-
dotTexture('make', cfg, thisEvent);
44+
45+
if strcmp(cfg.design.localizer, 'MT_MST') && strcmpi(thisEvent.trial_type, 'static') && ~mod(iEvent,2)
46+
47+
else
48+
49+
dotTexture('make', cfg, thisEvent);
50+
51+
end
4552

4653
apertureTexture('make', cfg, thisEvent);
4754

4855
%% draw evetything and flip screen
4956

5057
dotTexture('draw', cfg, thisEvent);
51-
58+
5259
apertureTexture('draw', cfg, thisEvent);
5360

5461
thisFixation.fixation.color = cfg.fixation.color;

0 commit comments

Comments
 (0)