Setup Eyelink, MATLAB, and PsychToolbox (macOS)
Overview: At a high level, researchers are presenting stimulus routines to subjects and measuring eye movement. SR Research, the manufacturer of the EyeLink 1000 (a video-based eye-tracker), and developer of the EyeLink Toolbox (software that supports the measurement of eye movement) provides an interface between MATLAB (a high-level interpreted language), PsychToolbox (a visual display programming utility), and the device.
Note: PsychToolbox DOES NOT support most versions of macOS/MATLAB, and this document is geared towards support of legacy equipment/code. Check the PsychToolbox site for the latest updates. You are encouraged to run a version of GNU/Linux instead.
Prerequisites: Check compatibility of the following with the researcher:
Hardware (CPU, GPU, sound card, etc. as described here)
macOS version (hardware needs to support macOS version)
MATLAB version (macOS needs to support MATLAB version, e.g. here)
PsychToolbox version (MATLAB needs to support PsychToolbox version)
Installation:
For purposes of this document, we’re going to go with a common setup.
Install macOS (10.13 High Sierra)
Install Apple’s Xcode (for SVN, and probably other dependencies)
Install 64-Bit Gstreamer (1.18.5 or higher) from gstreamer.freedesktop.org, then in System Preferences -> Security (Allow App Store & Identified developers)
Install Matlab (2019a)
Create a MATLAB launcher: https://gist.github.com/marshki/6f92ecc9058cfa5858cb6a6c2da9f9df
Set permissions on: /Applications/MATLAB9.6.app/toolbox/local/pathdef.m
Download PsychToolbox and run the installer. You can install a specific version of PsychToolbox with the generic installer by downloading it, and then doing this, e.g.:
cd ~/Desktop/
DownloadPsychtoolbox([], 'Psychtoolbox-3.0.10')
PsychtoolboxVersion
ans =
'3.0.10 - Flavor: Psychtoolbox-3.0.10 - Corresponds to SVN Revision 9491’
For more info visit: https://github.com/Psychtoolbox-3/Psychtoolbox-3'
Configure networking: One can use the onboard NIC for BOTH a connection to the outside world AND for communication with the EyeLink (by swapping cables), OR configure a dedicated NIC (USB to NIC, e.g.) to serve as an “always on” connection to the outside world.
In either case, one needs to configure a “new location” for EyeLink in macOS’s Network Preferences:
Ethernet
Configure IPv4: Manually
IP address: 100.1.1.2
Subnet mask: 255.255.0.0
(For two (2) NICs, I label one “EyeLink” and the other “World”)
EyeLink has a software developer kit (SDK), available from the vendor, which needs to be installed to work with PsychToolbox and/or PsychoPy.