SR Research Support Site
Controlling Calibration

The EyeLink Developers Kit library encapsulates much of the required functionality for calibration, drift correction, and handling participant setup after recording aborts. To do this, it requires you to supply a window that it can use for calibration, drift correction, and camera image display. You can customize some parameters of calibration and drift correction, including colors, target sizes, and sounds.

Calibration Colors

In the template, the SDL_Color variables target_foreground_color and target_background_color record the colors to be used for calibration, drift correction, and camera image graphics respectively. The foreground and background colors must be set in the eyelink_core_graphics library by calling set_calibration_colors().

The entire display is cleared to target_background_color before calibration and drift correction, and this is also the background for the camera images. The background color should match the average brightness of your experimental display, as this will prevent rapid changes in the participant's pupil size at the start of the trial. This will provide the best eye-tracking accuracy as well.

The target_foreground_color is used to draw calibration targets, and for the text on the camera image display. It should be chosen to supply adequate contrast to the background color.

A background color of black with white targets is used by many experimenters, especially for saccadic tasks. A full white (255,255,255) or a medium white (200,200,200) background with black targets is preferable for text. Using white or gray backgrounds rather than black helps reduce pupil size and increase eye- tracking range, and may reduce retinal afterimages.

Calibration Target Appearance

The standard calibration and drift correction target is a filled circle (for peripheral delectability) with a central "hole" target (for accurate fixation). The sizes of these features may be set with set_target_size(diameter, holesize). If holesize is 0, no central feature will be drawn. The disk is drawn in the calibration foreground color, and the hole is drawn in the calibration background color.

Users can replace the standard calibration and drift correction target with an image file. This can be done by calling set_cal_target_surface() or set_cal_background_surface(). Version 2.0 of the Developers Kit allows users to use an animated object (a short video clip) as the calibration target. This is done by calling the set_cal_animation_target() function. The expected video can be loadable using VFW codec (Video-for-Windows, type 1 avi). Both audio and video streams must be present in the clip and the audio stream must be of pcm type. Users can further configure how many times to loop through the video (a value of -1 to loop the video clip indefinitely).

Version 2.0 of the Developers Kit also allows users to control how the calibration target is presented. Instead of jumping between different screen positions, the target can move smoothly from one calibration position to another along a linear path with the set_lerp_on_target_move() function.

Calibration Sounds

The EyeLink Developers Kit library plays alerting sounds during calibration, validation and drift correction. These sounds have been found to improve the speed and stability of calibrations by cueing the participant, and make the experimenter's task easier. Three types of sounds are played: a target appearance alert sound, a success sound, and a failure/abort sound. Separate sounds can be selected for setup and drift correction.

Sounds are selected by strings passed to the eyelink_core_graphics functions set_cal_sounds() and set_dcorr_sounds(). If an empty string ("") or NULL is passed to these functions, the default sound is played. If the string is "off", no sound is played. Otherwise, the string is assumed to be the name of a WAV file to be played.

If no sound card is installed, the sounds are produced as "beeps" or "ticks" from the PC speaker. One beep marks target movement, two fast beeps mark success, and three slow beeps mark errors. These can be turned off by passing an "off" string for the sound.

To select the sounds to be played for calibration, validation and drift correction during a call to do_tracker_setup(), call set_cal_sounds(char *target, char *good, char *error). The sounds played mark the display or movement of the target, successful conclusion of calibration or good validation, and failure or interruption of calibration or validation.

During a call to do_drift_correct(), sounds are played as selected by set_dcorr_sounds(char *target, char *good, char *setup). The events are the initial display of the target, successful conclusion of drift correction, and pressing the ESC key to start the camera setup mode. Usually the good (drift correction completion sound) will be turned off, as this would occur at the start of the trial and might distract the participant.

Recording Abort Blanking

When a trial is aborted from the tracker (click on the "Abort" button in EyeLink host application, or press 'Ctrl'-'Alt'-'A' keys on the tracker keyboard), the eye tracker displays the Abort menu. This is detected by the check_recording() function of the eyelink_core library, which should be called often by your code during recording. The record abort is handled by this function by clearing the Display PC display to the calibration background color. This prepares the participant for the drift correction or re-calibration that usually follows, and removes the stimuli from the display. After the experimenter selects "Skip Trial", "Repeat Trial", or "Terminate Experiment" from the Abort menu, check_recording() returns the appropriate error code.


Copyright ©2002-2024, SR Research Ltd.