An Introduction to EyeLink Data (EDF Files)
EyeLink Data
The Host PC stores gaze data to an EDF (EyeLink Data Format) File that is opened on the Host PC at the start of the experiment. When the experiment finishes, the EDF File on the Host PC is closed, and a copy is typically sent via the ethernet link to the Display PC. The copy on the Host PC should be considered as a backup, and actual analyses are generally performed using the copy of the EDF file that was transferred to the Display PC. 

EDF Files store data in a binary format, and are not editable in any straightforward sense. The uneditable binary format ensures data integrity, by maintaining a version of the gaze data as it was originally recorded, before any further filtering or adjustments are carried out for analysis purposes.

The data contained in EDF Files can be analyzed using Data Viewer, which is a powerful software solution for visualizing and processing gaze data recorded with EyeLink eye trackers.  For most analysis scenarios, opening the EDF files in Data Viewer and then generating reports for further processing / statistical analysis is the optimal strategy. For more information about Data Viewer, please check the Getting Started with Data Viewer thread.

EDF files can also be converted to ASCII, using the command line or GUI versions of our EDF2ASC tool (see the post below for further details).

The ASCII converted data is useful as a means by which to understand the contents of EDF Files, but for most analysis scenarios this conversion is not necessary.

EDF File Data Types
The image below shows an extract from an EDF file that has been converted to ASCII. It illustrates the three key EyeLink data types: Samples, Events, and Messages. Please note that all three data types are read into Data Viewer directly from the EDF File.


Samples are the most basic (and prevalent!) type of data stored in EDF Files. If your sampling speed was set to 1000 Hz there will be one sample for every millisecond of data recorded, as in the example above. Sample data contains four critical types of information (which appear as separate columns in the ASCII data):

1) Timestamp
2) Gaze_X
3) Gaze_Y
4) Pupil Size.


In the extract above you can see that the timestamp increments by 2 with each row, indicating that the data was recorded at 500 Hz. The timestamp is based on a clock on the Host PC and is referred to as "EDF Time" or "Tracker Time". The clock starts at 0 the first time the Host PC is turned on.

The X,Y data can be either "GAZE" (screen pixel coordinates), "HREF" or "RAW". HREF and RAW data are not appropriate for the vast majority of analysis scenarios, and will not be considered further here. The data above is GAZE data, and you can see from the pixel coordinates in the highlighted sample that the person is fixating close to the center of a 1920x1080 screen.

The Pupil size data is in arbitary units - please see the How can I convert Pupil Size to mm? FAQ for detailed information on how these units can be converted to mm.

The final column of ... is reserved for flags.

If the recording was binocular then the gazeX, gazeY and Pupil Size data appear for both eyes (left eye then right eye), as illustrated below. In this excerpt the timestamp increments by one for each sample, indicating that the data was recorded at 1000 Hz.


If the data was recorded in Remote Mode, then the X,Y location of the target sticker (in camera sensor pixels) and its distance (in mm) are also available, as illustrated for a monocular recording in the excerpt below:


When converting the EDF data to ASCII, three other "sample level" data types can be added - Velocity, Resolution (Pixels per degree) and Input (the decimal value of the Status or Data Pins on the Host PC Parallel Port, if present).  The image below (head fixed monocular data recorded at 1000Hz) illustrates these additional sample data types.


When the eye cannot be tracked (for example during blinks) null values (".") are returned for the gaze X,Y data, and the Pupil Size data is zero.


The Host PC parses the gaze data as it is recorded, and uses a "saccade picking" strategy to parse the data into saccades, fixations and blinks. The start and end time of each event are marked, and the end events provide useful summary information. The saccade picking strategy results in "Event Pairs" - with EFIX (End Fixation) events always preceding an SSAC (Start Saccade) event, and ESAC (End Saccade) events always preceding an SFIX (Start Fixation) event. Blinks are always "wrapped" in a saccade. For more information about the operation of the Host PC Parsing algorithm, please see section 4.3 of the user manual or the following thread:

How are saccades/fixations defined?

A list of each event type, and annotation of the End event summary data is provided below:


If Resolution data is output at the sample level in the converted ASCII data, it is also available in the ESACC and EFIX summary data.

Several different types of messages can be seen in EDF Files that have been converted to ASCII. There are "system-generated" messages, which can be seen at the start of the file, as illustrated below. These messages are generally not required for analysis, but notice they contain potentially useful information such as the date the recording was made, and the results of the validation procedure. Other system-generated messages contain information about the calibration / validation procedure.


For analysis purposes, the most useful messages will have been "user-generated" and are typically sent by the stimulus presentation software to mark key events such as trial onset and offset, and the precise times of stimuli onset / participant responses etc). Such messages are illustrated below. They start with the MSG Flag, and the only parameters they have are a timestamp, an offset value, and the message text itself. If present, the offset value should be subtracted from the timestamp to give the time of the actual event occurrence. Data Viewer automatically handles these offsets.


Messages that start with "!V" are special messages intended specifically for Data Viewer, our analysis software. These messages typically provide Data Viewer with information it needs such as the path to any image files (to use as a backdrop in Spatial Overlay View), interest area sets and information about trial variables (as illustrated below).


For a comprehensive discussion of Data Viewer Integration messages, please see section 7 of the Data Viewer PDF Manual and the following thread: