Python interface and utilities for working with Open Ephys devices and electrophysiology data
Project description
Python OEphys
python-oephys is a comprehensive Python toolkit for working with Open Ephys devices and electrophysiology data. From file loading to real-time ZMQ streaming, signal processing to machine learning, and visualization tools—everything you need for high-density neural data analysis in one package.
✨ Key Features
- 📁 File I/O: Robust support for Open Ephys Binary (
.oebin) and.npzformats - 🔴 Real-time Streaming: Seamless integration with the Open Ephys GUI via ZMQ
- 🎛️ Signal Processing: Filtering (Bandpass, Notch), Channel QC, and synchronization
- 🤖 Machine Learning: Hybrid CNN-LSTM models for real-time gesture recognition
- 📊 Visualization: Real-time EMG viewer, offline analysis, and trial segmentation tools
- 🚀 Performance: Optimized for low-latency real-time applications
📦 Installation
From TestPyPI (Current Development Release)
pip install --index-url https://test.pypi.org/simple/ --no-deps python-oephys
From Source
git clone https://github.com/Neuro-Mechatronics-Interfaces/python-open-ephys.git
cd python-open-ephys
pip install -e .
Optional Extras
- GUI:
pip install 'python-oephys[gui]'(PyQt5, pyqtgraph) - ML:
pip install 'python-oephys[ml]'(PyTorch, scikit-learn) - Docs:
pip install 'python-oephys[docs]'(Sphinx)
🚀 Getting Started
Load and Filter Data
from pyoephys.io import load_open_ephys_session
from pyoephys.processing import filter_emg
# Load session
sess = load_open_ephys_session('path/to/recording.oebin')
data = sess['amplifier_data']
fs = sess['sample_rate']
# Apply filters
filtered = filter_emg(data, filter_type='bandpass', lowcut=10, highcut=500, fs=fs)
Real-time ZMQ Streaming
# Launch the live viewer (ensure ZMQ Interface plugin is active in GUI)
python -m pyoephys.applications._realtime_viewer --host 127.0.0.1 --channels 0:8
🗂️ Package Structure
pyoephys/
├── applications/ # GUI applications (Real-time & Offline viewers)
├── interface/ # ZMQ, LSL, and playback clients
├── io/ # Unified file loaders (.oebin, .npz)
├── ml/ # Gesture classification (CNN-LSTM)
├── plotting/ # Visualization utilities
└── processing/ # Signal filters, QC, and synchronization
examples/
├── benchmarks/ # Throughput and latency tests
├── interface/ # LSL, ZMQ, and hardware control
│ ├── hardware/ # Serial/UDP Pico integration
│ ├── imu/ # Sleeve IMU client & monitor
│ ├── lsl/ # LSL streaming & capture
│ └── zmq/ # ZMQ clients & plotters
└── machine_learning/ # Model training and evaluation
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by the Neuromechatronics Lab
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.0.tar.gz.
File metadata
- Download URL: python_oephys-0.1.0.tar.gz
- Upload date:
- Size: 175.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5209146b644580429d8adb10c7e71c301b8a01cfd87cc592c3d099333773304
|
|
| MD5 |
ac5aa0ed6953ecfb07c09efdc4ed81da
|
|
| BLAKE2b-256 |
8a195cbd655fb11a05a8c3fcd906d99ab64898ecbcc911b65d0c168214e448d7
|
File details
Details for the file python_oephys-0.1.0-py3-none-any.whl.
File metadata
- Download URL: python_oephys-0.1.0-py3-none-any.whl
- Upload date:
- Size: 120.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a73f24d9bcc6a3d2715453c259baf6114d5e9eb119e04ccc77f37c48c82ec1c
|
|
| MD5 |
e1a102a5f338040899d3839c5880868a
|
|
| BLAKE2b-256 |
bfc331d085c700b456ed842994bbe275222cc04caf8507a20d41a08eb6e12353
|