File tree Expand file tree Collapse file tree 2 files changed +28
-15
lines changed Expand file tree Collapse file tree 2 files changed +28
-15
lines changed Original file line number Diff line number Diff line change 1+ function varargout = postInitializationSetup(varargin )
2+ % varargout = postInitializatinSetup(varargin)
3+
4+ % generic function to finalize some set up after psychtoolbox has been
5+ % initialized
6+
7+ cfg = deal(varargin{: });
8+
9+ cfg.dot.matrixWidth = cfg .screen .winWidth ;
10+
11+ % Convert some values from degrees to pixels
12+ cfg.dot = degToPix(' size' , cfg .dot , cfg );
13+ cfg.dot = degToPix(' speed' , cfg .dot , cfg );
14+
15+ % Get dot speeds in pixels per frame
16+ cfg.dot.speedPixPerFrame = cfg .dot .speedPix / cfg .screen .monitorRefresh ;
17+
18+ cfg.aperture = degToPix(' xPos' , cfg .aperture , cfg );
19+
20+ % dots are displayed on a square with a length in visual angle equal to the
21+ % field of view
22+ cfg.dot.number = round(cfg .dot .density * ...
23+ (cfg .dot .matrixWidth / cfg .screen .ppd )^2 );
24+
25+ varargout = cfg ;
26+
27+ end
Original file line number Diff line number Diff line change 3333 %% Init the experiment
3434 [cfg ] = initPTB(cfg );
3535
36- cfg.dot.matrixWidth = cfg .screen .winWidth ;
37-
38- % Convert some values from degrees to pixels
39- cfg.dot = degToPix(' size' , cfg .dot , cfg );
40- cfg.dot = degToPix(' speed' , cfg .dot , cfg );
41-
42- % Get dot speeds in pixels per frame
43- cfg.dot.speedPixPerFrame = cfg .dot .speedPix / cfg .screen .monitorRefresh ;
44-
45- cfg.aperture = degToPix(' xPos' , cfg .aperture , cfg );
46-
47- % dots are displayed on a square with a length in visual angle equal to the
48- % field of view
49- cfg.dot.number = round(cfg .dot .density * ...
50- (cfg .dot .matrixWidth / cfg .screen .ppd )^2 );
36+ cfg = postInitializationSetup(cfg );
5137
5238 [el ] = eyeTracker(' Calibration' , cfg );
5339
You can’t perform that action at this time.
0 commit comments