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.
- 📁 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
pip install --index-url https://test.pypi.org/simple/ --no-deps python-oephysgit clone https://github.com/Neuro-Mechatronics-Interfaces/python-open-ephys.git
cd python-open-ephys
pip install -e .- GUI:
pip install 'python-oephys[gui]'(PyQt5, pyqtgraph) - ML:
pip install 'python-oephys[ml]'(PyTorch, scikit-learn) - Docs:
pip install 'python-oephys[docs]'(Sphinx)
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)# 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:8pyoephys/
├── 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
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by the Neuromechatronics Lab
