Skip to content

Commit 10b7afd

Browse files
committed
make log collect information about cross and aperture position
1 parent f8d3413 commit 10b7afd

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

setParameters.m

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,15 @@
148148
cfg.target.maxNbPerBlock = 1;
149149
cfg.target.duration = 0.05; % In secs
150150

151-
cfg.extraColumns = {'direction', 'speed', 'target', 'event', 'block', 'keyName'};
151+
cfg.extraColumns = { ...
152+
'direction', ...
153+
'speed', ...
154+
'target', ...
155+
'event', ...
156+
'block', ...
157+
'keyName', ...
158+
'fixationPosition', ...
159+
'aperturePosition'};
152160

153161
end
154162

@@ -157,7 +165,7 @@
157165
cfg.keyboard.responseKey = { ...
158166
'r', 'g', 'y', 'b', ...
159167
'd', 'n', 'z', 'e', ...
160-
't'}; % dnze rgyb
168+
't'};
161169
cfg.keyboard.keyboard = [];
162170
cfg.keyboard.responseBox = [];
163171

subfun/preSaveSetup.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33

44
% generic function to prepare structures before saving
55

6-
[thisEvent, iBlock, iEvent, duration, onset, cfg, logFile] = deal(varargin{:});
6+
[thisEvent, thisFixation, iBlock, iEvent, duration, onset, cfg, logFile] = ...
7+
deal(varargin{:});
78

89
thisEvent.event = iEvent;
910
thisEvent.block = iBlock;
1011
thisEvent.keyName = 'n/a';
1112
thisEvent.duration = duration;
1213
thisEvent.onset = onset - cfg.experimentStart;
14+
thisEvent.fixationPosition = thisFixation.fixation.xDisplacement;
15+
thisEvent.aperturePosition = cfg.aperture.xPos * sign(cfg.aperture.xPosPix);
1316

1417
% % this value should be in degrees / second in the log file
1518
% % highlights that the way speed is passed around could be

visualLocTranslational.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,13 @@
9797
% play the dots and collect onset and duraton of the event
9898
[onset, duration] = doDotMo(cfg, thisEvent, thisFixation);
9999

100-
thisEvent = preSaveSetup(thisEvent, iBlock, iEvent, duration, onset, cfg, logFile);
100+
thisEvent = preSaveSetup( ...
101+
thisEvent, ...
102+
thisFixation, ...
103+
iBlock, iEvent, ...
104+
duration, onset, ...
105+
cfg, ...
106+
logFile);
101107
saveEventsFile('save', cfg, thisEvent);
102108

103109
% collect the responses and appends to the event structure for

0 commit comments

Comments
 (0)