Skip to main content

Real-time analysis of intracranial neurophysiology recordings.

Project description

py_neuromodulation

Journal of Open Source Science publication:

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

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:

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

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

py_neuromodulation-0.1.7.tar.gz (25.9 MB view details)

Uploaded Source

Built Distribution

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

py_neuromodulation-0.1.7-py3-none-any.whl (19.9 MB view details)

Uploaded Python 3

File details

Details for the file py_neuromodulation-0.1.7.tar.gz.

File metadata

  • Download URL: py_neuromodulation-0.1.7.tar.gz
  • Upload date:
  • Size: 25.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for py_neuromodulation-0.1.7.tar.gz
Algorithm Hash digest
SHA256 3d7bd2bf6d73e2f8ebbb512bc64081d137ef084c19943eaa365eb65396b79b65
MD5 778e6f1340686db570463319019f4c57
BLAKE2b-256 15e198e6fc3826c1aec4702c2edfeeebad8cf415e58f9779bfe981bb82547425

See more details on using hashes here.

File details

Details for the file py_neuromodulation-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for py_neuromodulation-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1f70517a0359d4fd171d53854f3cc7fcff18386ca87bd54cb46d341b4b4b91eb
MD5 8bee83108d1300b95abfec1d77a037e3
BLAKE2b-256 86f7a53b471d5b6ac303e7682761f935faad055bf7958b41bbccf00c89263f1c

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