|
11 | 11 | % cfg.fixation.xDisplacement |
12 | 12 | % cfg.fixation.yDisplacement |
13 | 13 | % |
14 | | - % for cfg.fixation.type == 'bestFixation' |
| 14 | + % for cfg.fixation.type == 'bestFixation' |
15 | 15 | % Code adapted from: |
16 | 16 | % "What is the best fixation target?" |
17 | 17 | % DOI 10.1016/j.visres.2012.10.012 |
18 | 18 | % |
19 | 19 | % Contains a fixation cross and a dot |
20 | 20 | % |
21 | | - |
22 | | - |
| 21 | + |
23 | 22 | % Convert some values from degrees to pixels |
24 | 23 | cfg.fixation = degToPix('width', cfg.fixation, cfg); |
25 | 24 | cfg.fixation = degToPix('xDisplacement', cfg.fixation, cfg); |
26 | 25 | cfg.fixation = degToPix('yDisplacement', cfg.fixation, cfg); |
27 | | - |
| 26 | + |
28 | 27 | % Prepare fixation cross |
29 | 28 | xLine = [-cfg.fixation.widthPix cfg.fixation.widthPix 0 0] / 2; |
30 | 29 | yLine = [0 0 -cfg.fixation.widthPix cfg.fixation.widthPix] / 2; |
31 | | - |
| 30 | + |
32 | 31 | cfg.fixation.xCoords = xLine + cfg.fixation.xDisplacementPix; |
33 | 32 | cfg.fixation.yCoords = yLine + cfg.fixation.yDisplacementPix; |
34 | | - |
| 33 | + |
35 | 34 | cfg.fixation.allCoords = [cfg.fixation.xCoords; cfg.fixation.yCoords]; |
36 | | - |
37 | | - |
| 35 | + |
38 | 36 | switch cfg.fixation.type |
39 | | - |
| 37 | + |
40 | 38 | case 'bestFixation' |
41 | | - |
| 39 | + |
42 | 40 | % Code adapted from: |
43 | 41 | % What is the best fixation target? |
44 | 42 | % DOI 10.1016/j.visres.2012.10.012 |
45 | | - |
| 43 | + |
46 | 44 | cfg.fixation.outerOval = [ ... |
47 | 45 | cfg.screen.center(1) - cfg.fixation.widthPix / 2, ... |
48 | 46 | cfg.screen.center(2) - cfg.fixation.widthPix / 2, ... |
49 | 47 | cfg.screen.center(1) + cfg.fixation.widthPix / 2, ... |
50 | 48 | cfg.screen.center(2) + cfg.fixation.widthPix / 2]; |
51 | | - |
| 49 | + |
52 | 50 | cfg.fixation.innerOval = [ ... |
53 | 51 | cfg.screen.center(1) - cfg.fixation.widthPix / 6, ... |
54 | 52 | cfg.screen.center(2) - cfg.fixation.widthPix / 6, ... |
55 | 53 | cfg.screen.center(1) + cfg.fixation.widthPix / 6, ... |
56 | 54 | cfg.screen.center(2) + cfg.fixation.widthPix / 6]; |
57 | | - |
| 55 | + |
58 | 56 | end |
59 | | - |
| 57 | + |
60 | 58 | end |
0 commit comments