Pyxations
|
|
Pyxations is a Python library designed to analyze eye-tracking data, whether you are working with raw eye-tracking data or processed datasets. It helps researchers and developers extract useful insights from complex eye movements using Python's robust ecosystem.
Features
- Validated BIDS Conversion: Convert EyeLink, Tobii, GazePoint, and
webcam/WebGazer samples, tracker events, and behavioral tables to raw BIDS
while preserving the input folder verbatim under archival
sourcedata/. - EyeLink Import: Read EyeLink ASC exports directly, or accept EDF files by
first converting them with SR Research's
edf2ascutility. Pyxations then extracts messages, calibration reports, tracker events, and gaze samples from the resulting ASC data. - Trial Segmentation: Segment continuous eye-tracking data into trials using flexible methods, including start/end messages, fixed durations, or explicit start/end times.
- Behavioral Input Adapters: Normalize behavioral CSV, TSV, or standard
PsychoPy
New triallogs into BIDSevents.tsv, with source-independent column mapping and no PsychoPy runtime dependency. - Derivative Computation: Compute derivatives directly from the normalized raw BIDS dataset; the archived source files are not required at runtime.
- Analysis and Visualization: Load derivative tables through the experiment, subject, session, and trial hierarchy and generate gaze, scanpath, calibration, and task-specific plots.
- Eye Movement Detection: Use REMoDNaV, the Engbert–Kliegl implementation, or EyeLink-reported events.
- Saccades Direction Classification: Classify saccades based on their start and end coordinates into four primary directions: right, left, up, and down.
Requirements
Python 3.11or newer is required.- EyeLink EDF input requires the
edf2ascprogram from the EyeLink Developers Kit onPATH. Existing EyeLink ASC files can be read directly.
Dependencies
The base installation contains only the shared runtime stack:
numpypolarsmatplotlib
Feature-specific packages are optional:
pyxations[remodnav]adds REMoDNaV detection.pyxations[multimatch]adds MultiMatch scanpath comparison.pyxations[video]adds OpenCV-backed gaze animation, with optional video or image backgrounds.pyxations[all]installs all three feature groups.
Test and documentation tools are kept in optional dependency groups.
Canonical raw and derivative data are stored as compressed BIDS TSV/JSON, and the complete tabular pipeline uses Polars in memory.
Installation
Install the base package with uv or pip:
uv pip install pyxations
# or
pip install pyxations
Install only the features you use. The example below uses REMoDNaV:
pip install "pyxations[remodnav]"
For every optional feature:
pip install "pyxations[all]"
Documentation
Full documentation and API reference are available at https://neuroliaa.github.io/pyxations
Usage
Minimal example
import pyxations as pyx
# 1) Convert raw files to BIDS
bids_path = pyx.dataset_to_bids(
target_folder_path="path/to/output",
files_folder_path="path/to/source-recordings",
dataset_name="dataset_name",
format_name="eyelink",
task_name="visualsearch",
)
# 2) Compute derivatives using REMoDNaV
msg_keywords = ["begin", "end", "press"]
start_msgs = {"search": ["beginning_of_stimuli"]}
end_msgs = {"search": ["end_of_stimuli"]}
pyx.compute_derivatives_for_dataset(
bids_path,
dataset_format="eyelink",
detection_algorithm="remodnav",
msg_keywords=msg_keywords,
start_msgs=start_msgs,
end_msgs=end_msgs,
overwrite=True,
)
This produces two sibling, validator-tested BIDS datasets: the raw dataset and
dataset_name_derivatives. Canonical derivative samples and eye-movement
annotations are stored as compressed BIDS TSV.GZ files with JSON sidecars.
Pyxations reconstructs the same in-memory analysis tables when they are loaded.
Contributing
Contributions are welcome! Please check out the issues and submit a pull request if you'd like to help.
To develop locally
# Clone repository
git clone https://github.com/NeuroLIAA/pyxations.git
cd pyxations
# Create virtual environment and install
uv venv
uv pip install -e '.[dev]'
# To work on documentation
uv pip install -e '.[docs]'
License
This project is licensed under the MIT License.
Metadata
Release files for pyxations 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyxations-0.4.0.tar.gz | 100.1 kB | With provenance | Details for pyxations-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyxations-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for pyxations-0.4.0-py3-none-any.whl |
Total release size: 212.5 kB
Release files / pyxations-0.4.0.tar.gz
| Download URL | pyxations-0.4.0.tar.gz |
|---|---|
| Size | 100.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8201c5e5251c9cc58d527ededdde5ecfcbe81f9d2602c0c2eb8a86d7a0dd4a0b
|
|
BLAKE2b-256 checksum How to use checksums |
84af5461a3b937a0357c5c88486244250e12eb2038443ef9a4c85c88cb7f1cd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logRelease files / pyxations-0.4.0-py3-none-any.whl
| Download URL | pyxations-0.4.0-py3-none-any.whl |
|---|---|
| Size | 112.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba47924610fb4f50aa4dcf5cc43b2ebf401d8206ce9e0bc34fb1ca16d308722c
|
|
BLAKE2b-256 checksum How to use checksums |
c97b3af2122195ac96fbb09414cacfc814190dfa5fa5096e6cece8247334289e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logSecurity for pyxations 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pyxations-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.