Python interface and utilities for working with Open Ephys devices and electrophysiology data
Project description
python-open-ephys
python-open-ephys is a Python toolkit for loading, streaming, processing, and visualizing Open Ephys electrophysiology data. The project combines file I/O, real-time interfaces, signal-processing utilities, and higher-level application examples in one package.
Highlights
- Load Open Ephys Binary recordings and normalized NPZ exports.
- Stream live data from the Open Ephys GUI over ZMQ and LSL.
- Process EMG and electrophysiology signals with filtering, synchronization, and QC utilities.
- Run GUI tools for viewing recordings and inspecting real-time streams.
- Prototype machine-learning workflows on top of the same session format.
Installation
Install the latest published release from PyPI:
pip install python-oephys
Install optional feature sets as needed:
pip install "python-oephys[gui]"
pip install "python-oephys[ml]"
pip install "python-oephys[docs]"
Install from source for development:
git clone https://github.com/Neuro-Mechatronics-Interfaces/python-open-ephys.git
cd python-open-ephys
pip install -e .
Install a pre-release build from TestPyPI when you want to validate an upcoming release candidate:
pip install --index-url https://test.pypi.org/simple/ --no-deps python-oephys
Quick Start
from pyoephys.io import load_open_ephys_session
from pyoephys.processing import filter_emg
session = load_open_ephys_session("path/to/recording.oebin")
amplifier_data = session["amplifier_data"]
sample_rate = session["sample_rate"]
filtered = filter_emg(
amplifier_data,
filter_type="bandpass",
lowcut=10,
highcut=500,
fs=sample_rate,
)
Launch the real-time viewer against an Open Ephys ZMQ stream:
python -m pyoephys.applications._realtime_viewer --host 127.0.0.1 --channels 0:8
Examples
The repository includes runnable examples for common workflows:
examples/read_files/for loading.oebinrecordings and exporting session data.examples/interface/for ZMQ, LSL, IMU, and hardware integration workflows.examples/applications/for standalone viewers and analysis tools.examples/analysis/,examples/benchmarks/, andexamples/visualization/for downstream analysis and diagnostics.
Documentation
Hosted documentation: https://neuro-mechatronics-interfaces.github.io/python-open-ephys/
Build the docs locally with:
python -m sphinx -b html docs/source docs/build/html
Development
Run the test suite:
pytest tests/
Build source and wheel distributions:
python -m build
Release Workflow
- Pushes to
mainpublish the Sphinx site to GitHub Pages. - The
Test Publish to TestPyPIworkflow is available for manual pre-release validation. - Publishing a GitHub Release triggers the PyPI publish workflow.
Contributing
Issues and pull requests are welcome. If you are proposing a new feature, include the target workflow, example data format, and any GUI or hardware assumptions so the change can be tested cleanly.
License
This project is licensed under the MIT License. See LICENSE for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_oephys-0.1.2.tar.gz.
File metadata
- Download URL: python_oephys-0.1.2.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f96da0a1fb2eb7c250d54b688cee9e3e265f0de6e98fe683b3df4b58ec2c555
|
|
| MD5 |
c9c66528358018f7362c759d6c9743eb
|
|
| BLAKE2b-256 |
4afd90c888dd34218fa43acce44ecd8f51e92519861daec0392c233b3cb4969f
|
File details
Details for the file python_oephys-0.1.2-py3-none-any.whl.
File metadata
- Download URL: python_oephys-0.1.2-py3-none-any.whl
- Upload date:
- Size: 135.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a35b3be23f23b251a297a1453fd4bc9de9e303fdb51bcb852833dd14d66b081e
|
|
| MD5 |
6764c9f397eea12487811e185fac43e6
|
|
| BLAKE2b-256 |
917c990c8b0c2caff92d33292c30c81537e262127696348ab89fee1ece062aba
|