Skip to main content

Python library for importing XDF (Extensible Data Format)

Project description

Latest PyPI Release Latest Conda Release Python 3.5+ 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()

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.

Project details


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.5.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

pyxdf-1.16.5-py2.py3-none-any.whl (15.4 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: pyxdf-1.16.5.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pyxdf-1.16.5.tar.gz
Algorithm Hash digest
SHA256 18908770b4847f9b223a97b2fd615fa62ac0cce305c08c407e71d7ec3ab6108b
MD5 556502bf0b6a04508d8968b866c8295b
BLAKE2b-256 db7a3722f22e49f437577ad0bffb8d9fa58c88399511a20c4247bfb31f8d4a4d

See more details on using hashes here.

File details

Details for the file pyxdf-1.16.5-py2.py3-none-any.whl.

File metadata

  • Download URL: pyxdf-1.16.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pyxdf-1.16.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8c31bd958660f27f7a617100a742f35635d9e7bb296f0d05563d0cdccee1884f
MD5 0e0b287be7d43f480e35b56bd5a94191
BLAKE2b-256 3a45e5dad797ea098cd87f7674fe2f1f888fd1a32e18dad9270f7e364ccf998d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page