BSD 2-Clause "Simplified" License

项目介绍

xdf-modules/pyxdf 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 BSD 2-Clause "Simplified" License 许可证,目前获得 57 个 Star、26 次 Fork。

仓库全名
xdf-modules/pyxdf
开源许可证
BSD 2-Clause "Simplified" License
Star 数
57
Fork 数
26
未关闭 Issue
11

README 摘要

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: 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: printmetadata will print basic metadata…

完整内容见 GitHub 原始 README 或本页 。

常见问题

pyxdf 用什么语言开发?

主要使用 Python 编写,采用 BSD 2-Clause "Simplified" License 许可证,目前有 57 个 Star。

pyxdf 可以免费商用吗?

仓库采用 BSD 2-Clause "Simplified" License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 pyxdf 的源码?

可以直接克隆仓库:git clone https://github.com/xdf-modules/pyxdf.git;安装与运行步骤见仓库 README。

pyxdf 最近还在维护吗?

仓库最近一次更新为 3月31日,当前有 11 个未关闭 Issue;Star 数为 57,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Python package for working with XDF files

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
166
价值分
47
活跃状态
活跃

语言占比

Cython
Python

Release

README

Latest PyPI Release Latest Conda Release Python 3.10+ 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/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.

评论

暂无评论