Eye-tracking data

The MRI Centre is equipped with an EyeLink 1000 system from SR-Research.

This page, written with the precious help of Thierry Chaminade, presents how to convert the data from the EyeLink 1000 and how to provide usable data in the simplest and most robust way possible.

Prerequisites

The files generated by the EyeLink software are in EDF format. Please note: this is NOT the open version of this format for storing medical or biological data. It is a “proprietary” version developed by SR-Research.

In order to convert from the EDF format, it is necessary to install the “EyeLink Developers Kit” on the machine where the conversion has to be made. This API (Application Programmer’s Interface) is available free of charge on Win32/64, MacOS and Linux platforms. However, you must register on the SR-Research forum.

Converting the data

Once the API installed, you have access to several resources, including an executable: edf2asc

  • on Windows, this is installed in: Program Files (x86) \ SR Research \ EyeLink \ bin
  • On MacOS and Linux, it can be found in: / Applications / Eyelink / EDF_Access_API / Example,

This is the program that converts EDF files (including many binary parts) into ASC (ASCII) files which can be read directly by a text editor and therefore also via scripts programmed in the most commonly used languages (like Python and Matlab).

In addition, the SR-Research API includes a valuable and comprehensive resource: “EDF_Access_C_API_user_manual.pdf” which documents all the functions of the library

For Matlab users, an interesting and valuable resource can be found here :

https://github.com/uzh/edf-converter

In particular, a class edf2mat, which has its own function for displaying data content. This function quickly provides a way to (approximately) validate the reading of the file, but not a way to analyse it.

An example of the edf2mat function display

As an example, here is an extract of an ASC file obtained from an original EDF file:

An example of a conversion EDF -> ASC

This picture shows (among other things)

  • the header containing the calibration data
  • the columns storing :
    • the coordinates of the gazing point in screen coordinates (relative to the DISPLAY_COORDS” data (here: 0 0 1279 1023)
    • the pupil area (in number of camera pixels).

We also include two resources provided here. Thanks to Thierry Chaminade and Youssef Hmammouche

The edf2mat class: edf2mat.m

The Python script process_edf_file.py
In the latter, we will note the most important line: os.system (“EDF_Access_API/Example/edf2asc -failsafe -t -miss NaN -y -v %s”%args. input_filename)

Good processing 🙂