Skip to content

Commit aac1eb5

Browse files
committed
update doc and help sections
1 parent ab1d950 commit aac1eb5

File tree

10 files changed

+83
-5
lines changed

10 files changed

+83
-5
lines changed

README.md

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,66 @@ press the keys necessary to start or abort the experiment.
9898

9999
Using empty vectors (ie `[]`) or a negative value for those means that you will let PTB find and use the default device.
100100

101-
## Structure and function details
101+
## Structure
102+
103+
```matlab
104+
105+
cfg.testingDevice = 'pc';
106+
107+
% cfg.color
108+
cfg.keyboard.keyboard = [];
109+
cfg.keyboard.responseBox = [];
110+
cfg.keyboard.responseKey = {};
111+
cfg.keyboard.escapeKey = 'ESCAPE';
112+
113+
% cfg.debug
114+
cfg.debug.do = true;
115+
cfg.debug.transpWin = true;
116+
cfg.debug.smallWin = true;
117+
118+
% cfg.text
119+
cfg.text.font
120+
cfg.text.size
121+
cfg.text.style
122+
123+
% cfg.color
124+
cfg.color.background
125+
126+
% cfg.screen
127+
cfg.screen.monitorWidth
128+
cfg.screen.monitorDistance
129+
cfg.screen.idx
130+
cfg.screen.win
131+
cfg.screen.winRect
132+
cfg.screen.winWidth
133+
cfg.screen.winHeight
134+
cfg.screen.center
135+
cfg.screen.FOV
136+
cfg.screen.ppd
137+
cfg.screen.ifi
138+
cfg.screen.monRefresh
139+
140+
% cfg.audio
141+
cfg.audio.do
142+
cfg.audio.pahandle
143+
cfg.audio.devIdx
144+
cfg.audio.playbackMode
145+
cfg.audio.requestedLatency
146+
cfg.audio.fs
147+
cfg.audio.channels
148+
cfg.audio.initVolume
149+
cfg.audio.pushSize
150+
cfg.audio.requestOffsetTime
151+
cfg.audio.reqsSampleOffset
152+
153+
% cfg.mri
154+
cfg.mri.repetitionTime
155+
cfg.mri.triggerNb
156+
cfg.mri.triggerKey
157+
```
158+
159+
## function details
102160

103-
<!-- ### setParameters -->
104161

105162
### initPTB
106163

checkAbort.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
function checkAbort(cfg, deviceNumber)
2+
% checkAbort(cfg, deviceNumber)
3+
%
24
% Check for experiment abortion from operator
35
% When no deviceNumber is set then it will check the default device
46
% When an abort key s detected this will set a global variable and throw a

cleanUp.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
function cleanUp
1+
function cleanUp()
2+
% cleanUp()
3+
%
24
% A wrapper function to close all windows, ports, show mouse cursor, close keyboard queues
35
% and give access back to the keyboards.
46

degToPix.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
function structure = degToPix(fieldName, structure, cfg)
2+
% structure = degToPix(fieldName, structure, cfg)
3+
%
24
% For a given field value in degrees of visual angle in the structure,
35
% this computes its value in pixel using the pixel per degree value of the cfg structure
46
% and returns a structure with an additional field with Pix suffix holding that new value.

eyeTracker.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
function [el, edfFile] = eyeTracker(input, cfg, varargin)
2+
% [el, edfFile] = eyeTracker(input, cfg, varargin)
3+
%
4+
%
25

36
if ~cfg.eyeTracker.do
47

getResponse.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
function responseEvents = getResponse(action, deviceNumber, cfg, getOnlyPress)
2+
% responseEvents = getResponse(action, deviceNumber, cfg, getOnlyPress)
3+
%
24
% Wrapper function to use KbQueue
35
%
46
% The queue will be listening to key presses on a keyboard device:

initPTB.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
function [cfg] = initPTB(cfg)
2+
% [cfg] = initPTB(cfg)
3+
%
24
% This will initialize PsychToolBox
35
% - screen
46
% - the windon opened takes the whole screen unless
@@ -13,7 +15,8 @@
1315
% - hides cursor
1416
% - sound
1517
%
16-
% OUTPUT:
18+
% See the Readme for more details on the content of cfg
19+
%
1720
%
1821
%
1922

pressSpaceForMe.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
function pressSpaceForMe
1+
function pressSpaceForMe()
2+
% pressSpaceForMe()
3+
%
24
% Use that to stop your script and only restart when the space bar is pressed.
5+
%
36

47
fprintf('\nPress space to continue.\n');
58

testKeyboards.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
function testKeyboards(cfg)
2+
% testKeyboards(cfg)
3+
%
24
% Checks that the keyboards asked for properly connected.
35
% If no key is pressed on the correct keyboard after the timeOut time this exits with an error.
46

waitForTrigger.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
function waitForTrigger(cfg, deviceNumber)
2+
% waitForTrigger(cfg, deviceNumber)
3+
%
24
% Counts a certain number of triggers coming from the scanner before returning.
35
%
46
% Will print the count down in the command line and on the PTB window if one is

0 commit comments

Comments
 (0)