py-neuromodulation


Namepy-neuromodulation JSON
Version 0.0.7 PyPI version JSON
download
home_pageNone
SummaryReal-time analysis of intracranial neurophysiology recordings.
upload_time2024-10-29 17:08:38
maintainerTimon Merk
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT 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.
keywords dbs deep-brain-stimulation ecog eeg electrocorticography ieeg machine-learning real-time
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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 <https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html>`_ 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 <https://www.sciencedirect.com/science/article/pii/S1364661316302182>`_
* `fooof <https://fooof-tools.github.io/fooof/>`_
* `mne_connectivity estimates <https://mne.tools/mne-connectivity/stable/index.html>`_ 
* `Hjorth parameter <https://en.wikipedia.org/wiki/Hjorth_parameters>`_
* `non-linear dynamical estimates <https://nolds.readthedocs.io/en/latest/>`_
* 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:

.. code-block::

    pip install py-neuromodulation

Alternatively you can also clone the pacakge and install it using `uv <https://docs.astral.sh/uv/>`_:

.. code-block::

    uv python install 3.10
    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 <https://py-neuromodulation.readthedocs.io/en/latest/usage.html>`_ and `First examples <https://py-neuromodulation.readthedocs.io/en/latest/auto_examples/plot_0_first_demo.html>`_ for further introduction.

Contact information
-------------------
For any question or suggestion please find my contact
information at `my GitHub profile <https://github.com/timonmerk>`_.

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).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "py-neuromodulation",
    "maintainer": "Timon Merk",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "dbs, deep-brain-stimulation, ecog, eeg, electrocorticography, ieeg, machine-learning, real-time",
    "author": null,
    "author_email": "Timon Merk <timon.merk@charite.de>",
    "download_url": "https://files.pythonhosted.org/packages/0a/b5/307329772b8ee28e4f7035d06ef8ad3d2f4d1a1be0802dea573b94ba3609/py_neuromodulation-0.0.7.tar.gz",
    "platform": null,
    "description": "py_neuromodulation\n==================\n\nAnalyzing neural data can be a troublesome, trial and error prone,\nand beginner unfriendly process. *py_neuromodulation* allows using a simple\ninterface for extraction of established neurophysiological features and includes commonly applied pre -and postprocessing methods.\n\nOnly **time series data** with a corresponding **sampling frequency** are required for feature extraction.\n\nThe output will be a `pandas.DataFrame <https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html>`_ including different time-resolved computed features. Internally a **stream** get's initialized,\nwhich resembles an *online* data-stream that can in theory also be be used with a hardware acquisition system. \n\nThe following features are currently included:\n\n* oscillatory: fft, stft or bandpass filtered band power\n* `temporal waveform shape <https://www.sciencedirect.com/science/article/pii/S1364661316302182>`_\n* `fooof <https://fooof-tools.github.io/fooof/>`_\n* `mne_connectivity estimates <https://mne.tools/mne-connectivity/stable/index.html>`_ \n* `Hjorth parameter <https://en.wikipedia.org/wiki/Hjorth_parameters>`_\n* `non-linear dynamical estimates <https://nolds.readthedocs.io/en/latest/>`_\n* various burst features\n* line length \n* and more...\n\n\nFind here the preprint of **py_neuromodulation** called *\"Invasive neurophysiology and whole brain connectomics for neural decoding in patients with brain implants\"* [1]_.\n\nThe original intention for writing this toolbox was movement decoding from invasive brain signals [2]_.\nThe application however could be any neural decoding problem.\n*py_neuromodulation* offers wrappers around common practice machine learning methods for efficient analysis.\n\nFind the documentation here neuromodulation.github.io/py_neuromodulation/ for example usage and parametrization.\n\nInstallation\n============\n\npy_neuromodulation requires at least python 3.10. For installation you can use pip:\n\n.. code-block::\n\n    pip install py-neuromodulation\n\nAlternatively you can also clone the pacakge and install it using `uv <https://docs.astral.sh/uv/>`_:\n\n.. code-block::\n\n    uv python install 3.10\n    uv venv\n    . .venv/bin/activate\n    uv sync\n\n\nThen *py_neuromodulation* can be imported via:\n\n.. code-block::\n\n    import py_neuromodulation as nm\n\nBasic Usage\n===========\n\n.. code-block:: python\n    \n    import py_neuromodulation as nm\n    import numpy as np\n    \n    NUM_CHANNELS = 5\n    NUM_DATA = 10000\n    sfreq = 1000  # Hz\n    sampling_rate_features_hz = 3  # Hz\n\n    data = np.random.random([NUM_CHANNELS, NUM_DATA])\n\n    stream = nm.Stream(sfreq=sfreq, data=data, sampling_rate_features_hz=sampling_rate_features_hz)\n    features = stream.run()\n\nCheck the `Usage <https://py-neuromodulation.readthedocs.io/en/latest/usage.html>`_ and `First examples <https://py-neuromodulation.readthedocs.io/en/latest/auto_examples/plot_0_first_demo.html>`_ for further introduction.\n\nContact information\n-------------------\nFor any question or suggestion please find my contact\ninformation at `my GitHub profile <https://github.com/timonmerk>`_.\n\nReferences\n----------\n\n.. [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).\n.. [2] Merk, T. et al. *Electrocorticography is superior to subthalamic local field potentials for movement decoding in Parkinson\u2019s disease*. Elife 11, e75126, `https://doi.org/10.7554/eLife.75126` (2022).\n",
    "bugtrack_url": null,
    "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.",
    "summary": "Real-time analysis of intracranial neurophysiology recordings.",
    "version": "0.0.7",
    "project_urls": {
        "bugtracker": "https://github.com/neuromodulation/py_neuromodulation/issues",
        "repository": "https://github.com/neuromodulation/py_neuromodulation"
    },
    "split_keywords": [
        "dbs",
        " deep-brain-stimulation",
        " ecog",
        " eeg",
        " electrocorticography",
        " ieeg",
        " machine-learning",
        " real-time"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dfb003e32aa24010dd5be8dea546d54b21b240a99b290a8e3c770e7f296e7e0c",
                "md5": "3638b52065ea8871d0ad03bd3e62d223",
                "sha256": "b8c5e8fcee6c2762949b0367ea3fdbb0b51407ca4bc99ea3c1aed6bcbcd2dacc"
            },
            "downloads": -1,
            "filename": "py_neuromodulation-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3638b52065ea8871d0ad03bd3e62d223",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 17158466,
            "upload_time": "2024-10-29T17:08:35",
            "upload_time_iso_8601": "2024-10-29T17:08:35.991565Z",
            "url": "https://files.pythonhosted.org/packages/df/b0/03e32aa24010dd5be8dea546d54b21b240a99b290a8e3c770e7f296e7e0c/py_neuromodulation-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ab5307329772b8ee28e4f7035d06ef8ad3d2f4d1a1be0802dea573b94ba3609",
                "md5": "9d2d9e503918356da9101a07790d305d",
                "sha256": "6771289ba3f55e0d9d8c56a0ba0bb2127460f9a68038ac8692a287232ed7fb3b"
            },
            "downloads": -1,
            "filename": "py_neuromodulation-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "9d2d9e503918356da9101a07790d305d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 19481175,
            "upload_time": "2024-10-29T17:08:38",
            "upload_time_iso_8601": "2024-10-29T17:08:38.849405Z",
            "url": "https://files.pythonhosted.org/packages/0a/b5/307329772b8ee28e4f7035d06ef8ad3d2f4d1a1be0802dea573b94ba3609/py_neuromodulation-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-29 17:08:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "neuromodulation",
    "github_project": "py_neuromodulation",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "py-neuromodulation"
}
        
Elapsed time: 0.32804s