Preprocessing scripts used for Pupil Labs Eye-tracker data
Data extraction bits are derived from the great GlassesTestCodeData repo that contains preprocessing code for multiple wearable eye trackers. Check out the paper as well.
Pupil dilation speed thresholding is based on Kret, M. E., & Sjak-Shie, E. E. (2019). Preprocessing pupil size data: Guidelines and code. Behavior research methods, 51(3), 1336-1342..
Main parts:
Tool for transforming Pupil Labs output data into handy .tsv files.
Contains the functions for preprocessing the data already in .tsv files. Includes:
- Simple threshold-based functions for filtering low confidence values and unrealistic pupil sizes
- Simple thresholding based on standard deviation
- Thresholding based on pupil dilation speed
- Linear interpolation
- Median filter
- Zero-phase lowpass filter
In general, .tsv files are transformed into pandas dataframes which are propagated through the different preprocessing steps.
Example for using the preprocessing functions.
Script for batch processing, tying data extraction and preprocessing together, with outputs for visual inspection.
Tool for compressing the videos in the Pupil Lab raw output.
Everything under _bak_misc is unneccesary - it contains previous versions, abandoned things, etc.