klabhub / neurostim

Design and run visual neuroscience experiments using Matlab and the Psychophysics Toolbox.
MIT License
5 stars 4 forks source link

Unifying support for different eye trackers... #145

Closed cnuahs closed 4 years ago

cnuahs commented 4 years ago

Proposed change here to handling of transformations in the eyetracker base class (and existing eyelink plugin).

Aims to address two issues:

  1. not all eye trackers return gaze position in screen/pixel coordinates like the eyelink. This change provides a mechanism for other eye trackers to convert their native coords to neurostim coords (see eyetracker.raw2ns()). The default is a call to cic.pixel2physical(), so eyelink works as expected.
  2. it is currently not possible to take control of eye tracker calibration entirely (i.e. do manual calibration within neurostim). This change allows specification of a clbMatrix which can be used to apply an arbitrary transformation (e.g., can be used for manual calibration). The default is an empty matrix and no transformation is applied.

Other changes:

  1. support for the Arrington Research Viewpoint eye tracker, and
  2. provides a switch to enable raw pupil position data from the Eyelink eye tracker.

These changes are backwards compatible and should be transparent to existing users of the eyelink plugin.

Please test if you're able.

adammorrissirrommada commented 4 years ago

@bartkrekelberg, I'll leave it to you to click "merge", in case you have any residual concerns.