Skip to content

Commit c95fff4

Browse files
committed
implement target repeat
1 parent 6fa3f4c commit c95fff4

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

setParameters.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,12 @@
133133
cfg.fixation.xDisplacement = 0;
134134
cfg.fixation.yDisplacement = 0;
135135

136+
% target
136137
cfg.target.maxNbPerBlock = 1;
137138
cfg.target.duration = 0.1; % In secs
139+
cfg.target.type = 'fixation_cross';
140+
% 'fixation_cross' : the fixation cross changes color
141+
% 'static_repeat' : dots are in the same position
138142

139143
cfg.extraColumns = { ...
140144
'direction', ...

subfun/doDotMo.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
% We then draw an aperture on top to hide the certain dots.
1919

2020
%% Get parameters
21-
22-
dots = initDots(cfg, thisEvent);
21+
if ~(strcmp(thisEvent.trial_type, 'static') && thisEvent.target == 1) ...
22+
|| isempty(dots)
23+
dots = initDots(cfg, thisEvent);
24+
end
2325

2426
% Set for how many frames this event will last
2527
framesLeft = floor(cfg.timing.eventDuration / cfg.screen.ifi);

visualMotionLocalizer.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@
9898
eyeTracker('Message', cfg, ...
9999
['start_trial-', num2str(iEvent), '_', thisEvent.trial_type]);
100100

101+
if ~strcmp(cfg.target.type, 'static_repeat')
102+
dots = [];
103+
end
101104
% play the dots and collect onset and duraton of the event
102105
[onset, duration, dots] = doDotMo(cfg, thisEvent, thisFixation, dots);
103106

0 commit comments

Comments
 (0)