Skip to content

Commit

Permalink
Merge 2498b9b into 28f7d71
Browse files Browse the repository at this point in the history
  • Loading branch information
isolver committed Apr 12, 2021
2 parents 28f7d71 + 2498b9b commit f2f727d
Show file tree
Hide file tree
Showing 70 changed files with 2,293 additions and 309 deletions.
@@ -0,0 +1,41 @@
eyetracker.hw.mouse.EyeTracker:
# True = Automatically start reporting events for this device when the experiment starts.
# False = Do not start reporting events for this device until enableEventReporting(True)
# is called for the device.
auto_report_events: False

# Should eye tracker events be saved to the ioHub DataStore file when the device
# is recording data ?
save_events: True

# Should eye tracker events be sent to the Experiment process when the device
# is recording data ?
stream_events: True

# How many eye events (including samples) should be saved in the ioHub event buffer before
# old eye events start being replaced by new events. When the event buffer reaches
# the maximum event length of the buffer defined here, older events will start to be dropped.
event_buffer_length: 1024
runtime_settings:
# How many samples / second should Mousegaze Generate.
# 50 or 100 hz are supported.
sampling_rate: 50

# MouseGaze always generates Monocular Right eye samples.
track_eyes: RIGHT_EYE

controls:
# Mouse Button used to make a MouseGaze position change.
# LEFT_BUTTON, MIDDLE_BUTTON, RIGHT_BUTTON.
move: RIGHT_BUTTON

# Mouse Button(s) used to make MouseGaze generate a blink event.
# LEFT_BUTTON, MIDDLE_BUTTON, RIGHT_BUTTON.
blink: [LEFT_BUTTON, RIGHT_BUTTON]

# Threshold for saccade generation. Specified in visual degrees.
saccade_threshold: 0.5

# MouseGaze creates (minimally populated) fixation, saccade, and blink events.
monitor_event_types: [MonocularEyeSampleEvent, FixationStartEvent, FixationEndEvent, SaccadeStartEvent, SaccadeEndEvent, BlinkStartEvent, BlinkEndEvent]

Expand Up @@ -36,12 +36,7 @@ eyetracker.hw.tobii.EyeTracker:
serial_number:

calibration:
# Should the PsychoPy Window created by the PsychoPy Process be minimized
# before displaying the Calibration Window created by the ioHub Process.
#
minimize_psychopy_win: False

# The Tobii ioHub Common Eye Tracker Interface currently support
# The Tobii ioHub Common Eye Tracker Interface currently support
# a 3, 5 and 9 point calibration mode.
# THREE_POINTS,FIVE_POINTS,NINE_POINTS
#
Expand Down Expand Up @@ -150,7 +145,7 @@ eyetracker.hw.tobii.EyeTracker:

runtime_settings:
# The supported sampling rates for Tobii are model dependent.
# Using a defualt of 60 Hz, with the assumption it is the most common.
# Using a defualt of 60 Hz.
sampling_rate: 60

# Tobii implementation supports BINOCULAR tracking mode only.
Expand Down
3 changes: 2 additions & 1 deletion docs/source/api/iohub/device/eyetracker.rst
Expand Up @@ -17,4 +17,5 @@ The following eye trackers are currently supported by iohub.

GazePoint<eyetracker_interface/GazePoint_Implementation_Notes>
SR Research<eyetracker_interface/SR_Research_Implementation_Notes>
Tobii<eyetracker_interface/Tobii_Implementation_Notes>
Tobii<eyetracker_interface/Tobii_Implementation_Notes>
MouseGaze (Simulated Eye Tracker)<eyetracker_interface/MouseGaze_Implementation_Notes>
@@ -0,0 +1,150 @@
##########
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(object)

.. 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(object)

.. 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(object)

.. 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

Expand Up @@ -114,7 +114,7 @@ monitor_devices:
# # name will be considered as possible candidates for connection.
# # If you only have one Tobii system connected to the computer,
# # this field can just be left empty.
# model_name: Any Pro Model
# model_name:
#
# # The serial number of the Tobii device that you wish to connect to.
# # If set, only the Tobii system matching that serial number will be
Expand Down
Expand Up @@ -11,7 +11,7 @@ monitor_devices:
# The model name of the Tobii device that you wish to connect to can be specified here,
# and only Tobii systems matching that model name will be considered as possible candidates for connection.
# If you only have one Tobii system connected to the computer, this field can just be left empty.
model_name: Any Pro Model
model_name:

# The serial number of the Tobii device that you wish to connect to can be specified here,
# and only the Tobii system matching that serial number will be connected to, if found.
Expand Down Expand Up @@ -70,6 +70,5 @@ monitor_devices:
expansion_speed: 30.0 # exapands at 30.0 pix / sec
contract_only: True
runtime_settings:
# The supported sampling rates for Tobii are model dependent.
# Using a default of 60 Hz, with the assumption it is the most common.
sampling_rate: 120
# The supported sampling rates for Tobii are model dependent.
sampling_rate: 60

0 comments on commit f2f727d

Please sign in to comment.