Skip to main content

saccade-calibrate

Shows a sequence of targets, collects eye embeddings at each, and fits the regression that turns an eye appearance into a point on this participant's screen. No gaze estimate exists until this trial finishes. Thirteen points at the defaults takes about twenty seconds.

Package@saccadejs/plugin-calibrate
Browser globaljsPsychSaccadeCalibrate
Trial typesaccade-calibrate
Requiresthe extension and a running camera, so it comes after saccade-preview
timeline.push({ type: jsPsychSaccadeCalibrate });

Parameters

ParameterTypeDefaultDescription
calibration_points[number, number][]13 points: 3 × 3 at 5/50/95% plus four at 27.5/72.5%[x, y] pairs as a percentage of viewport width and height.
calibration_mode"view" | "click""view""view" captures automatically after the settle interval; "click" waits for the participant to click each point.
repetitions_per_pointnumber1How many times the whole sequence of points is repeated.
randomize_calibration_orderbooleanfalseShuffle the order on each repetition.
time_to_saccadenumber1000Settle time in ms before capture starts. The ring shrinks onto the dot over this interval.
time_per_pointnumber500Capture time in ms at each point. The ring turns green.
point_sizenumber20Diameter of the dot in pixels. The ring is four times this size.
lambdanumber | nullnullRidge penalty. null uses lambdaFor(n): 3 for nine points or fewer, otherwise 1.
clear_previousbooleantrueDiscard calibration points collected earlier in the experiment before starting.

Data

FieldTypeDescription
calibration_points_px[number, number][]The targets shown, in the order they appeared, in viewport pixels. The calibration_points parameter stays in percent.
n_pointsnumberThe number of distinct targets used.
repetitions_per_pointnumberHow many times the sequence was repeated.
lambdanumberThe ridge penalty the fit used, or null if the fit failed.
rtnumberMilliseconds from trial start to the end of calibration.

Example

// A denser grid, randomised, for a study that can afford the extra time.
timeline.push({
type: jsPsychSaccadeCalibrate,
calibration_points: [
[10, 10], [30, 10], [50, 10], [70, 10], [90, 10],
[10, 30], [30, 30], [50, 30], [70, 30], [90, 30],
[10, 50], [30, 50], [50, 50], [70, 50], [90, 50],
[10, 70], [30, 70], [50, 70], [70, 70], [90, 70],
[10, 90], [30, 90], [50, 90], [70, 90], [90, 90],
],
randomize_calibration_order: true,
time_to_saccade: 1200,
time_per_point: 600,
});

Ask participants to move their eyes rather than their head, and to hold the pose they will use for the rest of the experiment. Then validate.