Skip to main content

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:

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 http://py-neuromodulation.readthedocs.io for example usage and parametrization.

Installation

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

pip install py-neuromodulation

We recommend however installing the package in a new new conda environment:

git clone https://github.com/neuromodulation/py_neuromodulation.git
conda create -n pynm-test python=3.10
conda activate pynm-test

Then install the packages listed in the pyproject.toml:

pip install .

Optionally the ipython kernel can be specified for the installed pynm-test conda environment:

ipython kernel install --user --name=pynm-test

Then py_neuromodulation can be imported via:

import py_neuromodulation as py_nm

Basic Usage

import py_neuromodulation as pn
import numpy as np

NUM_CHANNELS = 5
NUM_DATA = 10000
sfreq = 1000  # Hz
feature_freq = 3  # Hz

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

stream = pn.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

py_neuromodulation-0.0.2.tar.gz (8.5 MB view details)

Uploaded Source

Built Distribution

py_neuromodulation-0.0.2-py3-none-any.whl (8.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_neuromodulation-0.0.2.tar.gz
  • Upload date:
  • Size: 8.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for py_neuromodulation-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9b3c35655e06f8a17fa006cab0fe6adbb115d8a2cdf240062b9a94b0c9fc09ef
MD5 a37bff79a409512a486ff2b5d72b9b08
BLAKE2b-256 7cd16c0d4d2facc6fd57e46d18b1f611d04b75c1e36c0835febcebba411cb221

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for py_neuromodulation-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8080f8d927170ee3d43ce257ee4e2c52323daaa5f7fccb279df297616bc5ce86
MD5 572887198846d2f19d913bc1e86b8fcb
BLAKE2b-256 86a48d6f084159dbb80a56d85c92dc0583f9811fb61ebdae0a368e2a963f1e8b

See more details on using hashes here.

Supported by

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