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

The following example loads minimal.xdf (which you can download from here and prints and plots all markers:

import matplotlib.pyplot as plt
import numpy as np

import pyxdf

data, header = pyxdf.load_xdf("minimal.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()

Note that you need to have matplotlib installed to run this example (which is not a dependency of PyXDF itself).

Command line interface (CLI)

PyXDF has a command line interface (CLI) with the following commands:

  • print_metadata will print basic metadata for each found stream.
    • python -m pyxdf.cli.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.cli.playback_lsl /path/to/my.xdf --loop

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

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxdf-1.17.2.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyxdf-1.17.2-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file pyxdf-1.17.2.tar.gz.

File metadata

  • Download URL: pyxdf-1.17.2.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyxdf-1.17.2.tar.gz
Algorithm Hash digest
SHA256 9c8fd726f940014265d1968009e23b296a04d000ced95a8e8db6b352bde0eb4b
MD5 3d325c105e60ef355a5af4268bb65a45
BLAKE2b-256 66688352bfbebf90a6b90ee288b7d5a8092252aeccaaae7c2350b05ef31d360b

See more details on using hashes here.

File details

Details for the file pyxdf-1.17.2-py3-none-any.whl.

File metadata

  • Download URL: pyxdf-1.17.2-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyxdf-1.17.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8d7c76e49f1a6fd5f0d751ac99d40b5f7bdb0b28678908ed036ecb12870268ed
MD5 abbca8afca13394cd1488d24875aadc7
BLAKE2b-256 7c8912fc90688d92072c741b2c399123bdbaaec6eec98ef379f37226bf00a8d4

See more details on using hashes here.

Release history Release notifications | RSS feed

1.17.5

2 files

1.17.4

2 files

1.17.3

2 files

This release

1.17.2 This release

2 files

1.17.1

2 files

1.17.0

2 files

1.16.8

2 files

1.16.7

2 files

1.16.6

2 files

1.16.5

2 files

1.16.4

2 files

1.16.3

2 files

1.16.2

2 files

1.16.1

2 files

1.16.0

2 files

1.15.2

2 files

1.15.1

2 files

1.14.0

2 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