Python library for importing XDF (Extensible Data Format)
Project description
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()
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/xdf-Python.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.2
), a PyPI package is created with the version number matching the release tag.
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
pyxdf-1.16.3.tar.gz
(18.6 kB
view hashes)
Built Distribution
pyxdf-1.16.3-py2.py3-none-any.whl
(15.3 kB
view hashes)
Close
Hashes for pyxdf-1.16.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e2c1646ad8939f348998c0419fe491c28ec99645a63f21f064820ad251501bc |
|
MD5 | bef09f62485fd39d07786f2a8a416f07 |
|
BLAKE2b-256 | 1519706a6d7031e2978141e69abc172faddd852ad8bbdb9ad3c486a899f740f1 |