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 are new to Experiment Builder, we recommend watching the introductory video tutorial series before starting this guide.

The included ProAntiSaccade task contains 12 trials (6 pro-saccade and 6 anti-saccade). A typical trial proceeds as follows:
  1. Drift Check
  2. Central Fixation (500, 1000, or 1500 ms)
  3. Peripheral Target (1000 ms)
The experiment's logic is driven by the Data Source within the main TRIAL sequence. Here is a breakdown of its key columns:
  • type: Defines the trial as pro or anti.
  • target_direction & expected_direction: These are used during analysis in Data Viewer to automatically check if the participant's saccade was in the correct direction.
  • fix_duration: Randomizes the central fixation time across trials.
The Data Source is set up for blocked randomization. The type column is blocked, ensuring all pro-saccade trials are presented first, followed by all anti-saccade trials. Within each of these blocks, the trial order is then shuffled by checking the Enable Trial Randomization option.
   

The target_loc data source column defines stimulus positions in pixels using an (x, y) coordinate system that starts from the top-left corner of the screen. You can convert these pixel distances into degrees of visual angle based on your specific monitor size and participant viewing distance, and we provide an online calculator to assist with this.

The target_loc column in the Data Source defines the target's position in pixels. Experiment Builder uses a top-left coordinate system, where (0, 0) is the top-left corner of the screen.

For example, on the project's 1920x1080 monitor:
  • The coordinate (331, 540) places the target on the left side and vertically centered.
  • The coordinate (1589, 540) places the target on the right side and vertically centered.
  • This positioning makes the horizontal distance of each target from the screen's center 629 pixels.
These pixel values can be converted to degrees of visual angle, which depends on the participant's viewing distance. In this demo, a viewing distance of 97cm makes the target's amplitude approximately 10° of visual angle.

To calculate and adjust the target amplitude for your own experimental setup, you can use our online tool as a guide:    

The project uses several key nodes to control the experiment's flow. 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).
Inside the RECORDING sequence, several nodes present the stimuli and control the timing of each trial:
  • CENTRAL_FIXATION: Displays the central fixation cross. It also creates a circular Interest Area (CENTRAL_IA) around the fixation point, which is used during analysis to verify that saccades started from the center.
  • TIMER_FIXATION: Controls the fixation duration by linking its Duration property to the fix_duration data source column.
  • SACCADE_TARGET: Draws the peripheral target. Its Location property is linked to the target_loc column.
  • TIMER_1000: Holds the target on screen for 1000 ms.
  • DISPLAY_BLANK: Shows a blank screen to end the stimulus presentation.
Crucially, the Message property of each stimulus-drawing node (e.g., CENTRAL_FIXATION, SACCADE_TARGET) 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 in Data Viewer.



Visualizing and analyzing the data with Data Viewer:
If you're new to Data Viewer, we recommend watching the video tutorial series for a general overview before you begin.
  1. Step 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:
    1. Open a new session in Data Viewer.
    2. Go to File > Import Data > Multiple EyeLink Data Files....
    3. 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. Step 2: Define a Target Interest Period
    For this analysis, we are primarily interested in saccades that occur after the target appears. To isolate this time window, create an Interest Period.
    1. Click the "Full Trial Period" dropdown menu at the top of the screen and select Edit....
    2. Click the "New Interest Period" icon.
    3. Define a new Interest Period (e.g., target_period) that begins with the SACCADE_TARGET message and ends with the DISPLAY_BLANK message.
    4. Apply this new Interest Period to your data.
       

  3. Step 3: Viewing Pre-Period Interest Areas
    The central fixation Interest Area (IA) appears before our target_period Interest Period (IP) begins. To make it 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. Step 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.
       

    When analyzing pro- and anti-saccade data, the Temporal Graph view is often more useful than the default spatial view. This view provides a clear gaze position vs. time plot, making it easy to see the timing and direction of eye movements.

    To switch to this view:
    • Click the Temporal Graph view button.
    • Toggle ON sample visibility and zoom out to see the full trial.
    The graph plots the gaze X/Y position (y-axis) over time (x-axis). You will see fixations marked in light blue and saccades in yellow.
       

    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 will 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:
    • Eyelid Closes: As the eyelid begins to close, it covers the top part of the pupil.
    • Pupil Center Shifts: The tracker sees the center of the visible part of the pupil, which rapidly shifts downwards as it becomes occluded.
    • Saccade is Detected: This fast, artificial shift in gaze position is classified as a downward saccade.
    • 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.
       

  5. Step 5: Cleaning Data and Generating Reports
    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 Data Filters.
    • 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.

  6. Step 6: 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.

    Generating the Report and Selecting Variables
    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)

  7. Step 7: 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 may be too small to have a meaningful direction, so their CURRENT_SAC_DIRECTION may be a dot (.), indicating a missing value.

    For example, if you look at the data for 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.
       

    Similarly, if you look at p2- trial 7, the report for this anti-saccade trial shows a classic error-correction pattern across two saccades. The target was presented on the LEFT, so the expected correct response was to the RIGHT.

    The participant's first eye movement was an error:
    • CURRENT_SAC_INDEX = 1
    • CURRENT_SAC_START_INTEREST_AREA_LABEL = CENTRAL_IA
    • CURRENT_SAC_DIRECTION = LEFT (Incorrect direction, toward the target)
    • CURRENT_SAC_AMPLITUDE = 9.49
    Immediately following this, the participant made a large correction:
    • CURRENT_SAC_INDEX = 2
    • CURRENT_SAC_DIRECTION = RIGHT (Correct direction, away from the target)
    • CURRENT_SAC_AMPLITUDE = 15.7


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, such as occurring after a target and having a minimum amplitude. This guide explains how to set up this feature for both post-target and anticipatory saccades.

Automatically Flagging the Primary Saccade
This procedure will flag the first saccade that occurs after a specific event and meets a minimum amplitude threshold. To define your reaction time period, please follow these steps:
  1. From the main menu, go to Analysis > Reaction Time Manager....
  2. In the manager window, click the "New RT Definition" icon to open the editor.
  3. Set the End Event Type to Saccade Event.
  4. Switch to the Reaction Time tab.
  5. In the Start Time Message Text field, enter the message that marks your target onset (e.g., SACCADE_TARGET).
  6. In the Minimum Saccadic Amplitude field, enter your desired threshold in degrees of visual angle (e.g., 5).
  7. Click OK to save and close the windows.
After applying the definition, switch to the Temporal Graph view. The primary saccade that meets your criteria will now be marked with a vertical red line at its start.
   

Reporting and Interpreting the Flag
To use the flag you just created, re-generate your Saccade Report and be sure to include the CURRENT_SAC_IS_RT_END variable. In the output file, a value of TRUE for this variable identifies the primary saccade.

Here’s how to interpret different scenarios you might find in your data:
  • Correctly Flagged Saccade (p1, trial 10): The first saccade (CURRENT_SAC_INDEX = 1) is correctly marked with CURRENT_SAC_IS_RT_END = TRUE, confirming it met all criteria (e.g., started centrally, correct direction, amplitude >= 5°).
  • Ignored Initial Saccade (p3, trial 7): The first saccade was smaller than 5°, so it was ignored. The second saccade, which was large enough, was correctly flagged as the primary saccade.
  • No Saccade Flagged (p3, trial 10): No saccade in the trial was large enough to meet the 5° amplitude criterion, so all saccades have CURRENT_SAC_IS_RT_END = FALSE.

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
    • 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.
    • Go back to the Reaction Time Manager (Analysis > Reaction Time Manager...) and edit your existing RT definition.
    • Change the Start Time Message Text from SACCADE_TARGET to CENTRAL_FIXATION.
  2. Verify the Results
    After applying these changes, the red line in the Temporal Graph will now identify any saccades that meet your amplitude criteria before the target appeared, flagging them as anticipatory.

    To confirm your findings, generate a new Saccade Report while your pre_target Interest Period is active. Any saccade with a CURRENT_SAC_IS_RT_END value of TRUE is one that met your criteria for an anticipatory saccade.
       


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