Real-time analysis of intracranial neurophysiology recordings.
Project description
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.10. 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.10
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.
References
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
Built Distribution
File details
Details for the file py_neuromodulation-0.0.7.tar.gz
.
File metadata
- Download URL: py_neuromodulation-0.0.7.tar.gz
- Upload date:
- Size: 19.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6771289ba3f55e0d9d8c56a0ba0bb2127460f9a68038ac8692a287232ed7fb3b |
|
MD5 | 9d2d9e503918356da9101a07790d305d |
|
BLAKE2b-256 | 0ab5307329772b8ee28e4f7035d06ef8ad3d2f4d1a1be0802dea573b94ba3609 |
File details
Details for the file py_neuromodulation-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: py_neuromodulation-0.0.7-py3-none-any.whl
- Upload date:
- Size: 17.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8c5e8fcee6c2762949b0367ea3fdbb0b51407ca4bc99ea3c1aed6bcbcd2dacc |
|
MD5 | 3638b52065ea8871d0ad03bd3e62d223 |
|
BLAKE2b-256 | dfb003e32aa24010dd5be8dea546d54b21b240a99b290a8e3c770e7f296e7e0c |