[Paper Review] PUPILS pipeline: A flexible Matlab toolbox for eyetracking and pupillometry data processing
The PUPILS pipeline is a flexible, user-friendly MATLAB toolbox designed to automate the preprocessing of eye-tracking and pupillometry data. It detects blinks and saccades, interpolates missing data, and denoises pupil traces using customizable parameters, delivering clean, annotated data ready for downstream analysis with minimal user input beyond sampling frequency and units.
With the development of widely available commercial eye trackers, the use of eye tracking and pupillometry have become prevalent tools in cognitive research, both in industry and academia. However, dealing with pupil recordings often proves challenging, as the raw data produced by the eye tracker is subject to noise and artifacts. With the PUPILS toolbox the authors wish to simplify the processing of pupil data for researchers. The toolbox receives the raw data extracted from the eye tracker output files and provides an analysis of the relevant pupillary events (e.g., blinks and saccades), interpolates missing data and denoises the recorded traces. The final output of the toolbox is a cleaned up recording that can be easily exported for use in further analysis.
Motivation & Objective
- To simplify the preprocessing of noisy, artifact-ridden pupil tracking data from commercial eye trackers.
- To provide researchers with a plug-and-play solution that reduces manual data cleaning effort in cognitive neuroscience studies.
- To enable accurate detection of key pupillary events—blinks, saccades, and fixations—through configurable algorithms.
- To support diverse experimental designs by allowing customization of processing parameters and modular extension of processing stages.
- To ensure compatibility with a wide range of eye trackers across different sampling frequencies (e.g., 60 Hz to 500 Hz).
Proposed method
- The pipeline processes raw eye-tracking data through a modular sequence: blink detection, saccade detection, data interpolation, and signal smoothing.
- Blink detection identifies regions where pupil size drops below three standard deviations below the mean, following established criteria.
- Saccade detection uses angular velocity calculated from gaze position vectors over five-sample intervals, with a default threshold of 30°/s.
- The angular velocity is computed using the inverse cosine of the dot product between consecutive gaze vectors relative to the head center.
- Missing data and blink-affected regions are linearly interpolated, with configurable pre- and post-interval extensions (default: 50 ms before, 150 ms after).
- The final signal is low-pass filtered at a default cutoff frequency of 10 Hz to reduce noise, with user-defined filter parameters available.
Experimental results
Research questions
- RQ1How can researchers efficiently preprocess noisy, artifact-laden pupillometry data without extensive manual intervention?
- RQ2What are the optimal, configurable parameters for detecting blinks and saccades in diverse eye-tracking datasets?
- RQ3To what extent can a modular, extensible pipeline improve reproducibility and flexibility in pupillometry data analysis?
- RQ4How does the pipeline maintain data quality across different sampling rates and tracker types?
Key findings
- The PUPILS pipeline successfully processes raw eye-tracking data from both low-frequency (60 Hz) and high-frequency (500 Hz) trackers with consistent performance.
- Blink detection using a three-standard-deviation threshold reliably identifies occlusion events, minimizing false positives.
- Saccade detection with a 30°/s velocity threshold effectively captures rapid eye movements, with user-adjustable thresholds for specialized applications.
- Linear interpolation with extended pre- and post-blink windows reduces edge artifacts, improving signal continuity.
- Low-pass filtering at 10 Hz effectively reduces high-frequency noise while preserving physiologically relevant pupillary dynamics.
- The toolbox outputs a fully annotated data frame with original, interpolated, and denoised signals, enabling direct use in statistical and time-series analysis.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.