py_neuromodulation
Journal of Open Source Science publication:
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
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:
pip install py-neuromodulation
Alternatively you can also clone the pacakge and install it using uv:
uv python install 3.12
uv venv
. .venv/bin/activate
uv sync
Then py_neuromodulation can be imported via:
import py_neuromodulation as nm
Basic Usage
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
Metadata
Release files for py-neuromodulation 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| py_neuromodulation-0.1.7.tar.gz | 25.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_neuromodulation-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.9 MB
Release files / py_neuromodulation-0.1.7.tar.gz
| Download URL | py_neuromodulation-0.1.7.tar.gz |
|---|---|
| Size | 25.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d7bd2bf6d73e2f8ebbb512bc64081d137ef084c19943eaa365eb65396b79b65
|
|
BLAKE2b-256 checksum How to use checksums |
15e198e6fc3826c1aec4702c2edfeeebad8cf415e58f9779bfe981bb82547425
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / py_neuromodulation-0.1.7-py3-none-any.whl
| Download URL | py_neuromodulation-0.1.7-py3-none-any.whl |
|---|---|
| Size | 19.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f70517a0359d4fd171d53854f3cc7fcff18386ca87bd54cb46d341b4b4b91eb
|
|
BLAKE2b-256 checksum How to use checksums |
86f7a53b471d5b6ac303e7682761f935faad055bf7958b41bbccf00c89263f1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|