Now Shipping! – The EyeLink 3; combined head and eye tracking at up to 1000 Hz.

FAQ: How do I implement a pro/anti saccade task?
#1
This tutorial outlines how to create a basic pro/anti-saccade task in Experiment Builder and then visualize the data and compute key analysis metrics in Data Viewer.

Since many variations of saccade tasks exist, this guide focuses on showcasing a few common analysis approaches and providing useful tips.

Key Analysis Metrics
The analysis typically focuses on the "primary saccade"—the first major eye movement after the target appears.
  • For pro-saccade trials (looking toward the target):
    • Latency: How long it takes for the saccade to begin.
    • Amplitude: How far the eye moves.
  • For anti-saccade trials (looking away from the target):
    • Error Rate: The percentage of trials where the participant incorrectly looked toward the target instead of away from it.
    • Latency & Amplitude: Measured for both correct (away) and error (toward) saccades.
Applying Trial Criteria
Researchers often apply criteria to exclude invalid trials from analysis. This tutorial will demonstrate how to implement these criteria in Data Viewer. Common examples include excluding trials if:
  • The saccade latency is too short (e.g., less than 80 ms).
  • The saccade does not start from the central fixation area (e.g., within 1° of the center).

Disclaimer: This guide focuses on the technical implementation of these techniques. It does not provide advice on which specific criteria are appropriate for your research. Researchers should always be guided by the established scientific literature on such matters.



Creating the task with Experiment Builder:
If you're new to Experiment Builder, we recommend watching the introductory video tutorial series before starting this guide.

The attached ProAntiSaccade task contains 12 trials: 6 pro-saccade trials followed by 6 anti-saccade trials. A typical trial proceeds as follows:
  • Drift Check
  • Variable Duration Central Fixation (500, 1000, or 1500 ms)
  • Peripheral Target (1000 ms)
  • Blank Screen

The experiment's logic is driven by the Data Source, which is randomized to present all pro-saccade trials first, followed by the anti-saccade trials. Within each block, the trial order is randomized.

Here is a breakdown of its key columns:
  • type: Defines the trial as pro or anti.
  • target_direction: The location where the target will appear.
  • expected_direction: The location of where the participant is expected to look.
  • fix_duration: Defines the central fixation time.
  • target_loc: Sets the (x, y) pixel coordinates for the peripheral target.
    Note: The target_loc column uses a top-left coordinate system. On the demo's 1920x1080 screen, the coordinates (331, 540) and (1589, 540) place targets on the left and right, vertically centered.

The Data Source randomization is configured to first block trials by the type column. This ensures all pro-saccade trials are presented as one block, followed by all anti-saccade trials. Within each of those blocks, the trial order is then shuffled by checking the "Enable Trial Randomization" option.
   

These pixel distances can be converted into degrees of visual angle, which also requires knowing the participant's viewing distance. In this demo, a viewing distance of 97cm results in a target amplitude of approximately 10° of visual angle.

To calculate the correct pixel values for your own setup, you can use our online https://www.sr-research.com/visual-angle-calculator/ .
   

Experiment Flow and Logic
  • Trial Sequence
    The main TRIAL sequence uses two CONDITIONAL triggers to display instructions at the start of each block:
    • CHECK_TRIAL_1: Shows pro-saccade instructions before the first trial.
    • CHECK_TRIAL_7: Shows anti-saccade instructions before the seventh trial (the first anti-saccade trial).

  • Recording Sequence (Events Within a Trial)
    Inside the RECORDING sequence, several nodes present the stimuli and control timing:
    • CENTRAL_FIXATION: Displays the fixation cross. It also creates a circular Interest Area around the fixation point, which can be used during analysis to verify that saccades started from the center.
    • TIMER_FIXATION: Controls the fixation duration by linking to the fix_duration data source column.
    • SACCADE_TARGET: Draws the peripheral target. Its Location property is linked to the target_loc column to present it on the left or right.
    • TIMER_1000: Holds the target on screen for 1000 ms.
    • DISPLAY_BLANK: Shows a blank screen to end the trial.
    Crucially, the Message property of each stimulus-drawing node (e.g., CENTRAL_FIXATION) has been filled in. This ensures that a timestamped message is sent to the EyeLink Data File whenever a stimulus appears, which is essential for accurate analysis.


Visualising and analysing the data with Data Viewer:
This part of the tutorial walks through how to import and analyze the sample data in Data Viewer.

If you're new to Data Viewer, we recommend watching the video tutorial series for a general overview before you begin.
  1. Import the Data
    The sample project folder (ProAntiSaccade_deploy.zip) contains collected data from three participants (p1, p2, and p3). To begin the analysis, import all their data files:
    • Open a new session in Data Viewer.
    • Go to File > Import Data > Multiple EyeLink Data Files....
    • Navigate to the results directory inside the ProAntiSaccade_deploy folder and select the files for all three participants.
    After importing, you should see grouping nodes for p1, p2, and p3 in the Inspector window, each containing 12 trials.

  2. Define a Target Interest Period
    For this analysis, we're primarily interested in saccades that occur after the target appears. To isolate this time window, you should create an Interest Period. This will define a period that starts when the saccade target appears and ends when the trial concludes.
    • Click the "Full Trial Period" dropdown menu at the top of the screen and select Edit.
    • Click the "New Interest Period" icon.
    • Define a new Interest Period (e.g., target_period) that begins with the SACCADE_TARGET message and ends with the DISPLAY_BLANK message.
       

  3. Viewing Pre-Period Interest Areas
    The central fixation Interest Area (IA) appears before our target_period Interest Period (IP) begins. To ensure this IA is still visible during your analysis, you need to adjust a preference setting:
    • In the Inspector window, select the Preferences tab.
    • Go to the Data Filters section.
    • Check the box next to Show Interest Areas Pre Interest Period.

  4. Visualizing and Interpreting Eye Movements
    After adjusting the preference, return to the Data tab in the Inspector. Toggle ON the visibility for both saccades and fixations. ✅

    Now, in the Spatial Overlay view, you can see the complete sequence of eye movements for each trial. For example, trial 2 for participant p1 shows a typical pattern:
    • An initial fixation inside the central IA.
    • A primary saccade that undershoots the peripheral target.
    • A brief fixation after the first saccade.
    • A second, corrective saccade that lands on the target.
    • A final fixation on the target location.
       

  5. Using the Temporal Graph View
    When analyzing pro- and anti-saccade data, it is often more useful to visualize the data in a gaze position vs. time plot.

    To switch to this view in Data Viewer:
    • Click the Temporal Graph view button.
    • Toggle ON the sample visibility and zoom out to see the full trial.
    You should now see the gaze X/Y position (y-axis) plotted over time (x-axis). On top of the raw data, fixations will be marked in light blue and saccades in yellow.
       

  6. Visualizing Blinks in the Temporal Graph
    To see blinks in your data, simply toggle their visibility ON in the Inspector window.

    For an example, look at trial 7 for participant p3. In the Temporal Graph, the blink will appear as a red vertical bar within your interest period.

    You'll notice that the red blink bar is always surrounded by a saccade (marked in yellow). This is a known recording artifact called a blink-saccade.

    This occurs because the eye tracker computes gaze position based on the center of the pupil. Here's what happens during a blink:
    1. Eyelid Closes: As the eyelid begins to close, it covers the top part of the pupil.
    2. Pupil Center Shifts: The tracker sees the center of the visible part of the pupil, which rapidly shifts downwards as it becomes occluded.
    3. Saccade is Detected: This fast, artificial shift in gaze position is classified as a downward saccade.
    4. Blink Begins: The actual blink event is logged only when the pupil is fully hidden.
    A similar, upward saccade artifact occurs when the eyelid re-opens at the end of the blink.
       

  7. Merge Blink-Saccade Artifacts
    Blink-saccades are recording artifacts that can interfere with your analysis. To merge them with the main blink event so they are excluded from saccade reports:
    • In the Inspector window, go to the Preferences tab.
    • Select the Data Filters section.
    • Uncheck the box next to Display Blink Saccades.
    You will see the red blink bar in the Temporal Graph expand to absorb the surrounding saccade artifacts.

  8. Create a Saccade Report
    Preparing the Report: Set a Relative Time Scale
    To calculate saccade latencies from the moment the target appears, you must set the report's time scale relative to your Interest Period.
    • In the Inspector window, go to the Preferences tab.
    • Select the Output / Analysis section.
    • Set the Time Scale to IP Relative.
    This makes time zero for all events in the report correspond to the SACCADE_TARGET message.

    Go to Analysis > Reports > Saccade Report. We recommend including the following variables:
    • CURRENT_SAC_INDEX
    • CURRENT_SAC_START_INTEREST_AREA_LABEL
    • CURRENT_SAC_DIRECTION
    • CURRENT_SAC_ANGLE
    • CURRENT_SAC_AMPLITUDE
    • CURRENT_SAC_START_TIME
    • CURRENT_SAC_END_TIME
    • TRIAL_SACCADE_TOTAL
    • target_direction (from your data source)
    • expected_direction (from your data source)
    • type (from your data source)

  9. Interpret the Saccade Report
    The report generates one row for each saccade. When you open it in a spreadsheet program, you can analyze the sequence of eye movements in detail.
       
    Note: Very small saccades (like brief corrective movements) are often too small to have a meaningful direction, so their CURRENT_SAC_DIRECTION may be a dot (.), indicating a missing value.
    • Example 1: Correct Pro-Saccade (p1, trial 1)
      The data for the first saccade (CURRENT_SAC_INDEX = 1) tells us:
      • Start: It began in the CENTRAL_IA.
      • Direction: It moved to the RIGHT, correctly matching both the target_direction and the expected_direction.
      • Metrics: The amplitude was 9.24° and the latency was 228 ms.
    • Example 2: Anti-Saccade Error and Correction (p2, trial 7)
      This anti-saccade trial shows a two-saccade sequence:
      • Saccade 1 (Error): The first saccade started centrally but moved LEFT. This was toward the target, but opposite the expected_direction (RIGHT).
      • Saccade 2 (Correction): The next saccade was a large corrective movement to the RIGHT, in the correct direction for an anti-saccade trial.


Reaction Time Events:
You can use Data Viewer's Reaction Time (RT) Definition feature to automatically flag the first saccade in a trial that meets specific criteria (like a minimum amplitude). This makes it easy to isolate the primary saccade for analysis.
  1. Identifying the Post-Target Primary Saccade
    This procedure will flag the first large saccade that occurs after the target appears.
    1. Create the RT Definition
      1. Go to Analysis > Reaction Time Manager....
      2. Click the "New RT Definition" icon to open the editor.
      3. Set the End Event Type to Saccade Event.
      4. In the Reaction Time tab, set the Start Time Message Text to SACCADE_TARGET.
      5. Set the Minimum Saccadic Amplitude to your desired value (e.g., 5 degrees).
      6. Click "OK" to save and close the windows.
      In the Temporal Graph view, the primary saccade that meets these criteria will now be marked with a vertical red line at its start.
         
    2. Use the Flag in a Report
      To use this flag in your analysis, re-generate your Saccade Report and add the variable CURRENT_SAC_IS_RT_END. In the resulting file, a value of TRUE for this variable identifies the primary saccade.
      • In trial 10 for participant p1, the first saccade is correctly flagged as the primary saccade (CURRENT_SAC_IS_RT_END = TRUE).
      • In trial 7 for participant p3, the first saccade was too small (<5°) and was ignored. The second, larger saccade was correctly flagged as the primary saccade.
      • In trial 10 for participant p3, no saccade was large enough to meet the criteria, so all saccades have CURRENT_SAC_IS_RT_END = FALSE.
  2. Detecting Anticipatory Saccades
    You can adapt this same technique to find large saccades that occurred before the target appeared.
    1. Adjust the Interest Period and RT Definition
      1. Create a new Interest Period (e.g., pre_target) that starts with the CENTRAL_FIXATION message and ends with the SACCADE_TARGET message. Apply it to your data.
      2. Go back to the Reaction Time Manager and edit your existing RT definition.
      3. Change the Start Time Message Text from SACCADE_TARGET to CENTRAL_FIXATION.
    2. Analyze the Results
      The red line in the Temporal Graph will now identify any saccades that meet your amplitude criteria within this new pre-target period.
         

      If you generate a new Saccade Report for this period, any saccade with CURRENT_SAC_IS_RT_END = TRUE is a large, anticipatory saccade. For example, you can now identify the anticipatory saccade in trial 10 for participant p3.


Attached Files
.ebz   ProAntiSaccade.ebz (Size: 44.89 KB / Downloads: 0)