py_neuromodulation

py_neuromodulation: Signal processing and decoding for neural electrophysiological recordings - Published in JOSS (2025)

https://github.com/neuromodulation/py_neuromodulation

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: sciencedirect.com, joss.theoj.org
  • Committers with academic emails
    1 of 11 committers (9.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

dbs deep-brain-stimulation ecog electrocorticography machine-learning python real-time

Scientific Fields

Engineering Computer Science - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

Real-time analysis of intracranial neurophysiology recordings.

Basic Info
Statistics
  • Stars: 55
  • Watchers: 3
  • Forks: 16
  • Open Issues: 2
  • Releases: 13
Topics
dbs deep-brain-stimulation ecog electrocorticography machine-learning python real-time
Created almost 5 years ago · Last pushed 4 months ago
Metadata Files
Readme License

README.rst


py_neuromodulation
==================

Journal of Open Source Science publication:

.. image:: https://joss.theoj.org/papers/10.21105/joss.08258/status.svg
   :target: https://doi.org/10.21105/joss.08258



Documentation: https://neuromodulation.github.io/py_neuromodulation/

Analyzing neural data can be a troublesome, trial and error prone,
and beginner unfriendly process. *py_neuromodulation* allows using a simple
interface for extraction of established neurophysiological features and includes commonly applied pre -and postprocessing methods.

Only **time series data** with a corresponding **sampling frequency** are required for feature extraction.

The output will be a `pandas.DataFrame `_ including different time-resolved computed features. Internally a **stream** get's initialized,
which resembles an *online* data-stream that can in theory also be be used with a hardware acquisition system. 

The following features are currently included:

* oscillatory: fft, stft or bandpass filtered band power
* `temporal waveform shape `_
* `fooof `_
* `mne_connectivity estimates `_ 
* `Hjorth parameter `_
* `non-linear dynamical estimates `_
* various burst features
* line length 
* and more...


Find here the preprint of **py_neuromodulation** called *"Invasive neurophysiology and whole brain connectomics for neural decoding in patients with brain implants"* [1]_.

The original intention for writing this toolbox was movement decoding from invasive brain signals [2]_.
The application however could be any neural decoding problem.
*py_neuromodulation* offers wrappers around common practice machine learning methods for efficient analysis.

Find the documentation here neuromodulation.github.io/py_neuromodulation/ for example usage and parametrization.

Installation
============

py_neuromodulation requires at least python 3.12. For installation you can use pip:

.. code-block::

    pip install py-neuromodulation

Alternatively you can also clone the pacakge and install it using `uv `_:

.. code-block::

    uv python install 3.12
    uv venv
    . .venv/bin/activate
    uv sync


Then *py_neuromodulation* can be imported via:

.. code-block::

    import py_neuromodulation as nm

Basic Usage
===========

.. code-block:: python
    
    import py_neuromodulation as nm
    import numpy as np
    
    NUM_CHANNELS = 5
    NUM_DATA = 10000
    sfreq = 1000  # Hz
    sampling_rate_features_hz = 3  # Hz

    data = np.random.random([NUM_CHANNELS, NUM_DATA])

    stream = nm.Stream(sfreq=sfreq, data=data, sampling_rate_features_hz=sampling_rate_features_hz)
    features = stream.run()

Check the `Usage `_ and `First examples `_ for further introduction.

Contact information
-------------------
For any question or suggestion please find my contact
information at `my GitHub profile `_.

Contributing guide
------------------
https://neuromodulation.github.io/py_neuromodulation/contributing.html


References
----------

.. [1] Merk, T. et al. *Invasive neurophysiology and whole brain connectomics for neural decoding in patients with brain implants*, `https://doi.org/10.21203/rs.3.rs-3212709/v1` (2023).
.. [2] Merk, T. et al. *Electrocorticography is superior to subthalamic local field potentials for movement decoding in Parkinson’s disease*. Elife 11, e75126, `https://doi.org/10.7554/eLife.75126` (2022).

Owner

  • Name: Interventional Cognitive Neuromodulation - Neumann Lab Berlin
  • Login: neuromodulation
  • Kind: organization
  • Email: julian.neumann@charite.de
  • Location: Charité - Universitätsmedizin Berlin

Interventional and Cognitive Neuromodulation Group

JOSS Publication

py_neuromodulation: Signal processing and decoding for neural electrophysiological recordings
Published
August 14, 2025
Volume 10, Issue 112, Page 8258
Authors
Timon Merk ORCID
Movement Disorders Unit, Charité - Universitätsmedizin Berlin, Berlin, Germany
Antonio Brotons ORCID
Movement Disorders Unit, Charité - Universitätsmedizin Berlin, Berlin, Germany
Samed R. Vossberg ORCID
Movement Disorders Unit, Charité - Universitätsmedizin Berlin, Berlin, Germany
Richard M. Köhler ORCID
Movement Disorders Unit, Charité - Universitätsmedizin Berlin, Berlin, Germany
Thomas S. Binns ORCID
Movement Disorders Unit, Charité - Universitätsmedizin Berlin, Berlin, Germany, Bernstein Center for Computational Neuroscience Berlin, Berlin, Germany, Einstein Center for Neurosciences Berlin, Berlin, Germany
Ahmed Tarek Kamel Abdalfatah
Movement Disorders Unit, Charité - Universitätsmedizin Berlin, Berlin, Germany
Alessia Cavallo ORCID
Movement Disorders Unit, Charité - Universitätsmedizin Berlin, Berlin, Germany, Bernstein Center for Computational Neuroscience Berlin, Berlin, Germany
Elisa Garulli
Department of Neurology with Experimental Neurology, Charité – Universitätsmedizin Berlin, Berlin, Germany
Ashley Walton
Department of Neurosurgery, Massachusetts General Hospital, Harvard Medical School, Boston, Massachusetts, United States of America
Jojo Vanhoecke ORCID
Movement Disorders Unit, Charité - Universitätsmedizin Berlin, Berlin, Germany, Bernstein Center for Computational Neuroscience Berlin, Berlin, Germany
R. Mark Richardson ORCID
Department of Neurosurgery, Massachusetts General Hospital, Harvard Medical School, Boston, Massachusetts, United States of America
Wolf-Julian Neumann ORCID
Movement Disorders Unit, Charité - Universitätsmedizin Berlin, Berlin, Germany, Bernstein Center for Computational Neuroscience Berlin, Berlin, Germany, Einstein Center for Neurosciences Berlin, Berlin, Germany
Editor
Julia Romanowska ORCID
Tags
neuroscience electrophysiology signal processing feature computation machine learning neural decoding

GitHub Events

Total
  • Create event: 23
  • Release event: 3
  • Issues event: 32
  • Watch event: 9
  • Delete event: 20
  • Member event: 1
  • Issue comment event: 29
  • Push event: 151
  • Pull request review comment event: 9
  • Pull request review event: 5
  • Pull request event: 25
  • Fork event: 6
Last Year
  • Create event: 23
  • Release event: 3
  • Issues event: 32
  • Watch event: 9
  • Delete event: 20
  • Member event: 1
  • Issue comment event: 29
  • Push event: 151
  • Pull request review comment event: 9
  • Pull request review event: 5
  • Pull request event: 25
  • Fork event: 6

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 729
  • Total Committers: 11
  • Avg Commits per committer: 66.273
  • Development Distribution Score (DDS): 0.342
Top Committers
Name Email Commits
timonmerk t****k@c****e 480
Laura l****a@g****m 104
Richard Koehler r****r@o****e 69
timonmerk t****5@g****m 29
Jonathan Vanhoecke 7****e@u****m 16
timonmerk m****5@g****m 12
timonmerk 3****k@u****m 8
timon.merk t****k@u****m 5
mousa-saeed m****m@g****m 4
Richard Koehler k****d@c****e 1
jlbusch j****h@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 114
  • Total pull requests: 181
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 10
  • Total pull request authors: 9
  • Average comments per issue: 0.6
  • Average comments per pull request: 1.19
  • Merged pull requests: 151
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 22
  • Pull requests: 37
  • Average time to close issues: 8 days
  • Average time to close pull requests: 28 days
  • Issue authors: 5
  • Pull request authors: 9
  • Average comments per issue: 0.32
  • Average comments per pull request: 1.24
  • Merged pull requests: 20
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • timonmerk (83)
  • toni-neurosc (16)
  • danielmk (5)
  • SamedVossberg (2)
  • richardkoehler (2)
  • tsbinns (1)
  • alessiaca (1)
  • finsberg (1)
  • lauraflyra (1)
  • MMathisLab (1)
Pull Request Authors
  • timonmerk (73)
  • toni-neurosc (53)
  • richardkoehler (27)
  • SamedVossberg (12)
  • ahmedtarek- (8)
  • tsbinns (6)
  • elizaveta-terek (2)
  • alessiaca (2)
Top Labels
Issue Labels
enhancement (16) bug (8) documentation (3) wontfix (1) gui (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 140 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 14
  • Total maintainers: 1
pypi.org: py-neuromodulation

Real-time analysis of intracranial neurophysiology recordings.

  • Homepage: https://neuromodulation.github.io/py_neuromodulation/
  • Documentation: https://neuromodulation.github.io/py_neuromodulation/
  • License: MIT License Copyright (c) 2021 Interventional Cognitive Neuromodulation - Neumann Lab Berlin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.1.4
    published 5 months ago
  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 140 Last month
Rankings
Dependent packages count: 10.0%
Dependent repos count: 21.8%
Average: 28.5%
Downloads: 53.8%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/tests.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
environment.yml pypi
  • mrmr_selection *
  • nolds *
  • pybids >=0.12.4