File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ function cfg = postInitDots(cfg )
2+ %
3+ % cfg = postInitDots(cfg)
4+ %
5+ % generic function to finalize dots set up after psychtoolbox initialization
6+ %
7+ %
8+ % (C) Copyright 2022 CPP_PTB developpers
9+
10+ cfg.dot.matrixWidth = cfg .screen .winWidth ;
11+
12+ % Convert some values from degrees to pixels
13+ cfg.dot = degToPix(' size' , cfg .dot , cfg );
14+ cfg.dot = degToPix(' speed' , cfg .dot , cfg );
15+
16+ % Get dot speeds in pixels per frame
17+ cfg.dot.speedPixPerFrame = cfg .dot .speedPix / cfg .screen .monitorRefresh ;
18+
19+ cfg.aperture = degToPix(' xPos' , cfg .aperture , cfg );
20+
21+ % dots are displayed on a square with a length in visual angle equal to the
22+ % field of view
23+ cfg.dot.number = round(cfg .dot .density * ...
24+ (cfg .dot .matrixWidth / cfg .screen .ppd )^2 );
25+
26+ end
You can’t perform that action at this time.
0 commit comments