E-Prime and EyeLink

Last modified by Iris Spruit on 2023/07/14 10:11

Introduction

E-Prime can be used in combination with an EyeLink eye tracker. Integrating EyeLink communication in an E-Prime task is achieved with the E-Prime Extensions for EyeLink (EEE) package  Below a short description of how to use EEE is given. For more detailed information, please see the EEE User Manual and sample tasks (when EEE is installed, some basic tasks can be found in C:\Users\%USERNAME%\Documents\My Experiments\3.0, more advanced sample tasks can be found here). Note that following these instructions as well as those in the User Manual and sample tasks, provides a nice integration with the EyeLink Data Viewer analysis program. If a different program is used for data analysis, make sure that your data is suitable. Regardless, always pilot your task and verify that your data has the desired requirements.

EEE can only be used with E-Prime 3, not E-Prime 2

Availability, support and use-case

SOLO has one license for EEE available. It is currently not installed on any of the lab PC's. If you're interested in using EEE, please contact labsupport. SOLO can provide support for EEE. It is advised to use EEE when looking to integrate EyeLink communication in E-Prime (note that this can also be done without the EEE package, but this is a bit trickier and not described here). Note that it is also possible to integrate Tobii eye tracking in your E-Prime task, see here.

Adding EyeLink eye tracking to an E-Prime experiment

Steps

Below, the very basic steps of adding EyeLink eye tracking to an E-Prime experiment are described. For more advanced options, see the User Manual.

  • Add the EyeLink Extensions for E-Prime Package to the experiment by going to: Edit ⇒ Experiment ⇒ Packages ⇒ Add ⇒ select EEE and click OK. When the EEE package is not available, EEE is probably not (properly) installed.
  • Add the EyeLink Device by going to: Edit ⇒ Experiment ⇒ Devices ⇒ Add ⇒ select EyeLink and click OK. When the EyeLink device is not available, EEE is probably not (properly) installed.
  • Set the properties of the EyeLink device by double clicking on the EyeLink device.
    • Name: Name of the EyeLink device, can be left at default.
    • Input History Max Count. This is the Input History from E-Prime’s gaze data buffer size. This property controls the amount of time the eye tracker can save eye gaze data before the oldest data in the buffer is overwritten. For more information, see Appendix D: Timing and Synchronization in the User Manual.
    • Display. Display that is used with the eye tracker. Check this property when multiple displays are being used.
    • Host IP Address is by default set to 100.1.1.1. Leave this at the default, unless the IP address of the EyeLink PC was actively changed.
    • Sample rate. Recommended is to leave this to (unspecified). The value set on the EyeLink PC is then used.
    • Host Data File Name. The name of the .edf data file. When leaving at default, it will have the same name as the other E-Prime data files (e.g. .edat files).
    • Terminate Experiment. Checked by default. Uncheck when you want the experiment to continue when Link or File data is not present (unrecommended).
  • Add ELOpen with parameters: c, “on” (use “off” for dummy mode, i.e. no communication with EyeLink PC). If necessary, specify the file name and output folder (folder where the EyeLink data file (.edf) is stored).
  • Add ELClose to end of experiment.
  • Add ELCameraSetup right after ELOpen. This package call will handle the calibration and validation procedure. The default settings will provide a regular calibration and validation procedure. For more details on the different parameters that can be set, see the User Manual.
  • Add ELTrialBegin at start of trial procedure to start recording. The default settings will generate the necessary messages and interest areas for further analysis in EyeLink Data Viewer.
  • Add ELTrialEnd at end of trial procedure. The default settings will save all trial variables to the .edf file.
  • More optional package calls can be added. See the User Manual for more details.

Data folders

Some folders are created when running the E-Prime task. These folders are created in the Output folder, which is located in same folder as where the E-Prime task is located.

  • The EDF folder contains the .edf files for the experiment.
  • The Lists folder contains .dl and .ias files that are referenced by the .edf file to allow Data Viewer to display stimulus and interest area information.
  • The Resources folder contains image and video files that are loaded from references in the .edf file and in the .dl and .ias files.

Messages

With the basic setup as mentioned in the steps above, the following basic messages are automatically sent:

  • Onset messages for all objects
  • TrialBegin and TrialEnd messages

Running an experiment

The steps below describe how to run an E-Prime experiment with EyeLink integration.

  • Make sure the EyeLink PC is turned on.
  • Check the EyeLink settings on the EyeLink PC.
  • Check whether the eye is found correctly.
  • Run the E-Prime task.
  • Press C to calibrate.
  • When the default settings are used for the calibration (as set in the ELCameraSetup object) the following applies: At the start of the calibration, press space on the E-Prime or EyeLink PC once the participant has fixated on the first dot. After this, the other calibration points will continue automatically, but only when fixated correctly. Otherwise, press space on either PC to force acceptation. (See also the vForceManualAccept parameter in ELCameraSetup in the User Manual for more information).
  • Press Enter to accept the calibration results, or use the EyeLink PC to recalibrate.
  • Press V to validate the calibration results.
  • The validation process is similar to the calibration process. Press space to accept the fixation on the first dot. Then the process continues automatically.
  • When the validation data was poor, but the calibration was successful, the validation should be performed again.
  • Press to start the task.
  • After the task is complete, you can find the EyeLink files in the Output folder. These files can be opened with EyeLink Data Viewer, or other software.

SR research recommendations on a 'good' validation are 0.5 degree or less average error and 1.0 degree or less maximum error. Always check however what precision and accuracy are required for your study. See this thread on the SR Research Support Forum (you need to log in/create an account in order to view it) and this video about eye tracking data quality.

Setup EyeLink PC

The steps below describe how to setup the EyeLink PC. Note that these steps are normally taken care of by labsupport. If you wish to use EyeLink and a setup needs to be created in the lab, please contact labsupport.

  • Make sure the EyeLink PC is connected to the stimulus PC (where E-Prime is running on).
  • Make sure the IP address of the stimulus PC is set correctly:
    • Open the Control Panel
    • Navigate to Network and Internet
    • Navigate to Network and Sharing Center and click on the Ethernet option
    • Click Properties
    • Open the Internet Protocol Version 4 (TCP/IPv4) properties
    • Click the option to Use the following IP address. Specify the IP address: 100.1.1.2 and Subnet mask 255.255.255.0. Apply all the changes.
    • To check whether communication between PC’s is occurring correctly, you can ping the EyeLink PC (see here).

Tips & Tricks

  • Timing. Be aware that the ELTrialEnd object takes some time. This object handles data saving. The data of each trial is stored in a buffer during the trial. Then, at the end of the trial during ELTrialEnd, the data is written to the data file. When timing is critical, the duration of this object needs to be taken into account. The same applies to the ELStopBlockRecording object.
  • Buffer size. The buffer size is set in the Input History Max Count, which is a setting in the EyeLink device in E-Prime (Edit ⇒ Experiment ⇒ Devices). When the trial duration is relatively long, if is important to double check that the buffer size is large enough. Also note that the buffer size strongly depend on the sample rate. See also Appendix D: Timing and Synchronization in the User Manual.
  • ELOpen. Note that the ELOpen object (initialization of the EyeLink) can take a few seconds. A text display can be placed before it to show the experiment what is happening.

FAQ

TopicQuestionAnswer
EyeLink data files (.edf) locationWhere are the EyeLink data files (.edf) stored?By default, the EyeLink data files (.edf) are stored in the folder Output\EDF. The Output folder is located in the same folder as the E-Prime file. The name of the .edf file is by default the same as the name of the .edat file.
Host IP AddressWhat should the Host IP Address be?If setup correctly, the Host IP Address setting in the EyeLink device in E-Prime (Edit ⇒ Experiment ⇒ Devices) can be left at its default value of 100.1.1.1.
Sample rateHow do I know which sample rate to set in E-Prime?The sample rate setting in the EyeLink device in E-Prime (Edit ⇒ Experiment ⇒ Devices) can be left at unspecified. The sample rate as setup on the EyeLink host PC will then be used.

Resources

  • EEE User Guide
  • Sample tasks. When EEE is installed, basic sample tasks can be found in C:\Users\%USERNAME%\Documents\My Experiments\3.0, more advanced sample tasks can be found here)
  • SR Research Support Forum (you need to log in/create an account to be able to view the threads)
Tags:
   
solo
XWiki 14.10.13
contact@xwiki.com