Tutorials#

The tutorials are Jupyter notebooks that show how to do specific tasks from start to finish. Each page has a link to the notebook on GitHub and a Binder link binder that opens it in your browser, so you can run it without installing anything.

If you are new to pypillometry, start with the Quickstart.

Reading data#

Eyelink EDF files

Read an EDF file, including events and calibration data.

Importing data from Eyelink EDF files
Text files (ASC)

Read text files with pandas and build a data object from arrays.

Importing data from Eyelink ASC files
Events from a behaviour log

Add events from the log of the experiment software and synchronize its clock with the eye tracker.

Events from a behaviour log
Example datasets

The datasets that come with the package.

Example datasets included in pypillometry

Working with data objects#

Pipelines and history

Chain processing steps, keep a record of them, and decide between in-place changes and copies.

Pipeline-based processing in pypillometry
Eyes and variables

Monocular and binocular data, selecting and combining eyes, adding variables.

Processing monocular and binocular data
Summarizing data

Summaries of one or many datasets: contents, data quality, masked data and one value per trial, as tables.

Summarizing pupillometric data

Preprocessing and plotting#

Blinks

Detect, check and interpolate blinks.

Blink preprocessing
Missing data

Mask layers and policies on a real recording: blinks, off-screen gaze, excluded periods, interpolation and their effect on analyses.

Missing data
Plotting

Plot pupil and gaze data for exploration and quality checks.

Plotting pupillometric data for exploration

Modeling and complete analyses#

Modeling the pupil signal

Separate the signal into tonic baseline and phasic responses.

Modeling the pupillometric signal
A complete study

Preprocess a full study with many participants.

Example: Preprocessing of a full dataset with multiple subjects
Case study: an N-back task

One recording from start to end: behavioural log as event metadata, preprocessing, tonic pupil and ERPDs.

Case study: an N-back task

More examples for the experimental features are in Experimental features.