Pyxations: a Python-based toolbox to organize, parse, and analyse eye-movement data
Project description
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
- BIDS Conversion: Convert your dataset to BIDS format, automatically organizing files according to BIDS standards.
- EDF to ASCII Conversion: Convert EDF files to ASCII format using
edf2asc, a tool provided by EyeLink. - EDF Parsing: Parse EDF files generated by the EyeLink system to extract various data structures, including header information, messages, calibration data, events, and raw samples.
- Trial Segmentation: Segment continuous eye-tracking data into trials using flexible methods, including start/end messages, fixed durations, or explicit start/end times.
- Derivative Computation: Compute derivatives for a dataset by parsing EDF files and storing the results in an organized manner.
- Processing Derivatives: Process the derivatives by performing eye movement detection, classifying saccades, splitting them into trials, and visualizing the results.
- Eye Movement Detection: Detect fixations and saccades using multiple algorithms like REMoDNaV, Engbert–Kliegl, among others.
- Saccades Direction Classification: Classify saccades based on their start and end coordinates into four primary directions: right, left, up, and down.
Requirements
Python 3.10or newer is required.- The
edf2ascsoftware from EyeLink is required for converting EDF files to ASCII format. Please ensure that the EyeLink software is installed and accessible in your system's PATH. The program is provided with the lastest version of the EyeLink Developers Kit
Dependencies
Pyxations relies on several scientific computing and visualization libraries, including:
numpypandasmatplotlibseabornscipystatsmodelspyarrowremodnavmultimatch-gaze
The full list of dependencies is specified in pyproject.toml.
Installation
You can install Pyxations using uv (recommended for modern workflows):
uv pip install pyxations
Or directly with pip:
pip install pyxations
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
pyx.dataset_to_bids(
target_folder_path=" Path/to/the/folder/where/the/BIDS/dataset/will/be/created",
files_folder_path="Path/to/the/folder/containing/the/EDF/files",
dataset_name="dataset_name",
)
# 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,
)
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyxations-0.3.0.tar.gz.
File metadata
- Download URL: pyxations-0.3.0.tar.gz
- Upload date:
- Size: 56.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"20.04","id":"focal","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa6cc1250f18fb63b5ffaeb3548f769277e7e8fa5cfe160183218dbd2425828b
|
|
| MD5 |
43cfe0f20df7782f598d75c4f8f277cb
|
|
| BLAKE2b-256 |
c547df32cf21dd7428fc7c2125eb8380a8980a38f1b8085f8095d0d48d99cbab
|
File details
Details for the file pyxations-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pyxations-0.3.0-py3-none-any.whl
- Upload date:
- Size: 71.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"20.04","id":"focal","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de5320168116f1a8ed773d49b0504886e51b0d5cc780f72320520ac4d2e9f1ae
|
|
| MD5 |
aaac0232bbc18a7f353698de7b29e1d2
|
|
| BLAKE2b-256 |
9966943fabfc7be9c42e1cd8296aa7c155e41d82bb95e55e3607c08464c59486
|