Home   Coregistration tutorial   Test datasets   Papers using EYE-EEG   Workshops   News

EYE-EEG: Tutorial for Tobii Pro Users


Tobii Pro with EYE-EEG

EYE-EEG now also supports current Tobii Pro eye trackers. Infos for users of these systems and a timing test are found below. For more detailed instructions, please contact the Tobii Pro support.

Export specifications for users of Tobii Pro Lab


Eye tracking data recorded and exported using Tobii Pro Lab should be directly compatible with EYE-EEG's import function for Tobii Pro. You can include in the export file as many eye-tracking variables as are needed for the analysis in EYE-EEG. There are, however, three variables that are mandatory to include in the data export file so the file can be read by EYE-EEG: "Eyetracker timestamp", "Recording timestamp" and "Event value". Also, make sure to export a separate .tsv file for each participant.

Tobii Pro Lab Export Screenshot 1
Tobii Pro Lab Export Screenshot 2

(save screenshots to disc to view them at full size/resolution)


Important: When exporting the text data, make sure the text export option is set to standard 8-bit encoding by selecting "Standard (UTF8, .tsv)" (see left image below). If you have encoded your data instead at 16-bit, you can use a free text editor like Notepad++ to change the encoding to 8-bit (see right image below).

Tobii Pro Lab Export with 8-bit option
Converting to 8-bit in a texteditor

(save screenshots to disc to view them at full size/resolution)

Data format specifications for users of Pro SDK 3.0


Data recorded using Tobii Pro SDK and SDK 3.0 are not directly compatible with EYE-EEG's import function, but must be formatted first according to the following specifications:

  1. The eye tracking raw data file needs to be saved in a tab-separated text format.
  2. Columns should contain the different variables included, and each row should contain the gaze samples (or events) recorded.
  3. The first row of the data file should contain the name of each variable (also in tab-separated format).
  4. There are, in general, no restrictions regarding the number or type of variables included in the data file or the variable names chosen. However, there are a few exceptions of variables and variable names that contain specific information and are therefore mandatory to be included in the file so the file can be read by EYE-EEG:

    • Eyetracker timestamp: This variable contains the eye tracking timestamps of the gaze data samples using the eye tracker clock format.
    • Recording timestamp: This variable contains the eye tracking and event timestamps (in milliseconds) of the gaze data samples and events using the computer clock format. Tobii Pro SDK and SDK 3.0 users can calculate this variable by using the available time synchronization functions between the eye tracker clock and the local clock (see SDK documentation).
    • Event value: Events sent in numeric format (e.g. TTL events) need to be stored in a separate variable called Event value.
    • Event message: Events sent in string format (e.g. TCP/IP events) that contain a keyword and an event number (following EYE-EEG message format) need to be stored in a separate variable called Event message.

  5. If a numeric or message event is recorded at the same time as a gaze data sample, the event message or value can be stored in the same row as the gaze sample. If a numeric or message event value is recorded in between gaze samples, the event message or value can be stored in a separate row. In this case, the event should be stored in between the closest gaze samples with the corresponding timestamp expressed in the Recording timestamp variable format. Note that the variable Eyetracker timestamp should be kept in blank in this case, since there is not a gaze sample at that timestamp.
  6. Only numeric variables will be stored for further used in the EYE-EEG toolbox. Non-numeric variables can be stored in the Tobii data txt file but will be discarded by EYE-EEG during the import process.

Code to run a timing test (here: Tobii Pro TX-300)


Example code to run a clock synchronization test on a dataset in EYE-EEG

If you want to run the code below, you can download the necessary example data here.

	
eeglab % start EEGLAB

% load EEG file
EEG = pop_loadset('filename','tobii_sceneviewing_eeg.set','filepath','C:/');

% convert Tobii raw text output to MATLAB
ET = parsetobii('C:/tobii_sceneviewing_eyetrack_ascii.txt','C:/tobii_sceneviewing_eyetrack_matlab.mat','MYKEYWORD');

% load and synchronize EEG & Tobii
EEG = pop_importeyetracker(EEG,'C:/tobii_sceneviewing_eyetrack_matlab.mat',[100 200],[22 23],{'Gaze2d-Right.x' 'Gaze2d-Right.y'},0,1,0,1,4);

% SYNCHRONIZATION RESULTS (based on shared events):
% Mean abs. sync. error (estimated from "shared" events): 0.934 ms

% before timing test, reject bad gaze samples with blinks (i.e. gaze pixels outside screen area)
EEG = pop_rej_eyecontin(EEG,[6 7],[1 1],[1920 1080],50);

% check synchronization accuracy via cross-correlation of EOG and ET
EEG = pop_checksync(EEG,6,1,2,1); % chans 1 and 2 are left/right horiz. EOG

% SYNCHRONIZATION RESULTS (based on cross-correlation of signals):
% Maximum cross-correlation is observed at lag of 0 samples (= 0.00 ms):
% --> horizontal gaze and EOG perfectly aligned in this dataset after synchronization

Below you see the results of this cross-correlation test with a TX-300 tracker and BrainProducts EEG amplifiers run at Humboldt University. The peak should be at a lag of zero samples. This is the case for this recording, suggesting that the data records are precisely synchronized. We strongly recommend EYE-EEG users to use these functions to run timing tests on their specific setup.

Tobii Pro TX-300 sync test results

Analyzing the data


Analyzing data recorded with Tobii Pro in EYE-EEG

Instructions to process and analyze the combined EEG and eye-tracking data are found in the main EYE-EEG tutorial.