Skip to main content

Latest PyPI Release Latest Conda Release Python 3.9+ License

pyXDF

pyXDF is a Python importer for XDF files.

Sample usage

import pyxdf
import matplotlib.pyplot as plt
import numpy as np

data, header = pyxdf.load_xdf('test.xdf')

for stream in data:
    y = stream['time_series']

    if isinstance(y, list):
        # list of strings, draw one vertical line for each marker
        for timestamp, marker in zip(stream['time_stamps'], y):
            plt.axvline(x=timestamp)
            print(f'Marker "{marker[0]}" @ {timestamp:.2f}s')
    elif isinstance(y, np.ndarray):
        # numeric data, draw as lines
        plt.plot(stream['time_stamps'], y)
    else:
        raise RuntimeError('Unknown stream format')

plt.show()

CLI examples

pyxdf has an examples module. These can be run from the command line for basic functionality.

  • print_metadata will enable a DEBUG logger to log read messages, then it will print basic metadata about each found stream.
    • python -m pyxdf.examples.print_metadata -f=/path/to/my.xdf
  • playback_lsl will open an XDF file then replay its data in an infinite loop, but using current timestamps. This is useful for prototyping online processing.
    • python -m pyxdf.examples.playback_lsl /path/to/my.xdf

Installation

The latest stable version can be installed with pip install pyxdf.

For the latest development version, use pip install git+https://github.com/xdf-modules/pyxdf.git.

For maintainers

A new release is automatically uploaded to PyPI. Therefore, as soon as a new release is created on GitHub (using a tag labeled e.g. v1.16.3), a PyPI package is created with the version number matching the release tag.

Metadata

Release files for pyxdf 1.16.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyxdf 1.16.7
File Size Uploaded
pyxdf-1.16.7.tar.gz 22.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyxdf 1.16.7
File Interpreter ABI Platform
pyxdf-1.16.7-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 39.4 kB

Release files / pyxdf-1.16.7.tar.gz

Download URL pyxdf-1.16.7.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6bf60a52b5da35bfa3613a13c5d12ee17d46c0170f88d5df63ce56c9034233fd
BLAKE2b-256 checksum
How to use checksums
a2860afb2e2852cd7a1b1e550829656a33051122b4e9abb9950fef431b800e0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / pyxdf-1.16.7-py2.py3-none-any.whl

Download URL pyxdf-1.16.7-py2.py3-none-any.whl
Size 17.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5ae1997c212212cb6d53641ce8d485cf2253968755822ca0a7674434eea14548
BLAKE2b-256 checksum
How to use checksums
481b7dad175fc39a57b3ae2251468672e9d868fb1b69bc58488ebd15285f4b57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

1.17.5

2 release files

1.17.4

2 release files

1.17.3

2 release files

1.17.1

2 release files

1.16.8

2 release files

This release

1.16.7 This release

2 release files

1.16.6

2 release files

1.16.5

2 release files

1.16.4

2 release files

1.16.2

2 release files

1.16.1

2 release files

1.16.0

2 release files

1.15.1

2 release files

1.14.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page