File: MouseGaze_Implementation_Notes.rst

package info (click to toggle)
psychopy 2023.2.4%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 124,456 kB
  • sloc: python: 126,213; javascript: 11,982; makefile: 152; sh: 120; xml: 9
file content (149 lines) | stat: -rw-r--r-- 3,908 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
##########
MouseGaze
##########

MouseGaze simulates an eye tracker using the computer Mouse.

**Platforms:** 

* Windows 7 / 10
* Linux
* macOS

**Required Python Version:** 

* Python 3.6 +

**Supported Models:**

* Any Mouse. ;)

Additional Software Requirements
#################################

None

EyeTracker Class
################

.. autoclass:: psychopy.iohub.devices.eyetracker.hw.mouse.EyeTracker()
    :members: runSetupProcedure, setRecordingState, enableEventReporting, isRecordingEnabled,  getEvents, clearEvents, getLastSample, getLastGazePosition, getPosition, trackerTime, trackerSec, getConfiguration

Supported Event Types
#####################

MouseGaze generates monocular eye samples. A MonocularEyeSampleEvent
is created every 10 or 20 msec depending on the sampling_rate set
for the device.

The following fields of the MonocularEyeSample event are supported:

.. autoclass:: psychopy.iohub.devices.eyetracker.BinocularEyeSampleEvent

    .. attribute:: time

        time of event, in sec.msec format, using psychopy timebase.
        
    .. attribute:: gaze_x

        The horizontal position of MouseGaze on the computer screen,
        in Display Coordinate Type Units. Calibration must be done prior
        to reading (meaningful) gaze data.
        Uses Gazepoint LPOGX field. 

    .. attribute:: gaze_y

        The vertical position of MouseGaze on the computer screen,
        in Display Coordinate Type Units. Calibration must be done prior
        to reading (meaningful) gaze data.
        Uses Gazepoint LPOGY field. 

    .. attribute:: left_pupil_measure_1

        MouseGaze pupil diameter, static at 5 mm.

    .. attribute:: status

        Indicates if eye sample contains 'valid' position data.
        0 = MouseGaze position is valid.
        2 = MouseGaze position is missing (in simulated blink).


MouseGaze also creates basic fixation, saccade, and blink events
based on mouse event data.

.. autoclass:: psychopy.iohub.devices.eyetracker.FixationStartEvent
    
    .. attribute:: time
    
        time of event, in sec.msec format, using psychopy timebase.
            
    .. attribute:: eye

        EyeTrackerConstants.RIGHT_EYE.

    .. attribute:: gaze_x

        The horizontal 'eye' position on the computer screen
        at the start of the fixation. Units are same as Window.


    .. attribute:: gaze_y

        The vertical eye position on the computer screen
        at the start of the fixation. Units are same as Window.
    
.. autoclass:: psychopy.iohub.devices.eyetracker.FixationEndEvent

    .. attribute:: time

        time of event, in sec.msec format, using psychopy timebase.
        
    .. attribute:: eye

        EyeTrackerConstants.RIGHT_EYE.

    .. attribute:: start_gaze_x

        The horizontal 'eye' position on the computer screen
        at the start of the fixation. Units are same as Window.


    .. attribute:: start_gaze_y

        The vertical 'eye' position on the computer screen
        at the start of the fixation. Units are same as Window.

    .. attribute:: end_gaze_x

        The horizontal 'eye' position on the computer screen
        at the end of the fixation. Units are same as Window.


    .. attribute:: end_gaze_y

        The vertical 'eye' position on the computer screen
        at the end of the fixation. Units are same as Window.

    .. attribute:: average_gaze_x

        Average calibrated horizontal eye position during the fixation,
        specified in Display Units.

    .. attribute:: average_gaze_y

        Average calibrated vertical eye position during the fixation,
        specified in Display Units.

    .. attribute:: duration

        Duration of the fixation in sec.msec format.

Default Device Settings
#######################

.. literalinclude:: ../default_yaml_configs/default_mousegaze_eyetracker.yaml
    :language: yaml


**Last Updated:** March, 2021