Pyxdf
Python package for working with XDF files
Install / Use
/learn @xdf-modules/PyxdfREADME
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/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_metadatawill print basic metadata for each found stream.python -m pyxdf.cli.print_metadata -f=/path/to/my.xdf
playback_lslwill 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.
Related Skills
node-connect
338.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
83.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
83.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
338.0kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
