Skip to main content

Python interface and utilities for working with Open Ephys devices and electrophysiology data

Project description

Logo

python-open-ephys

Docs Tests PyPI Python License: MIT

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 .oebin recordings 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/, and examples/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 main publish the Sphinx site to GitHub Pages.
  • The Test Publish to TestPyPI workflow 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_oephys-0.1.2.dev0.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_oephys-0.1.2.dev0-py3-none-any.whl (135.1 kB view details)

Uploaded Python 3

File details

Details for the file python_oephys-0.1.2.dev0.tar.gz.

File metadata

  • Download URL: python_oephys-0.1.2.dev0.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

Hashes for python_oephys-0.1.2.dev0.tar.gz
Algorithm Hash digest
SHA256 9dc5d0a16364a6d77635b21d978596a054c33c5445f8edcaea76227ddce8d6ac
MD5 2fc9bacc6c987376d2d30e63754e4bd4
BLAKE2b-256 372d5641f2cacf2a758736dbd9a953a5af5b892714a6f39e06e02aac418ae99b

See more details on using hashes here.

File details

Details for the file python_oephys-0.1.2.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_oephys-0.1.2.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 55cf37da6c3fd7bf7eef9b8bbcfa8ad20e4d5d105c93da3e797c9fb108b1fe96
MD5 77164de6c9fc77dc00e0e62e04c13847
BLAKE2b-256 2d5912138ed80aae90b80ab16565c0269729ee39dc627d096d3a8f43539c5e7e

See more details on using hashes here.

Supported by

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