py-neuromodulation


Namepy-neuromodulation JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryReal-time analysis of intracranial neurophysiology recordings.
upload_time2024-04-12 13:39:10
maintainerTimon Merk
docs_urlNone
authorNone
requires_python>=3.10
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 real-time eeg ieeg dbs ecog electrocorticography deep-brain-stimulation machine-learning
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 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:

.. code-block::

    pip install py-neuromodulation


We recommend however installing the package using `rye <https://rye-up.com/guide/installation/>`_:

.. code-block::

    git clone https://github.com/neuromodulation/py_neuromodulation.git
    rye pin 3.11
    rye sync

And then activating the virtual environment e.g. in Windows using:

.. code-block::

    .\.venv\Scripts\activate

Alternatively you can also install the package in a conda environment:

    conda create -n pynm-test python=3.11
    conda activate pynm-test

Then install the packages listed in the `pyproject.toml`:

.. code-block::

    pip install .


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

.. code-block::

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

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.10",
    "maintainer_email": null,
    "keywords": "real-time, eeg, ieeg, dbs, ecog, electrocorticography, deep-brain-stimulation, machine-learning",
    "author": null,
    "author_email": "Timon Merk <timon.merk@charite.de>",
    "download_url": "https://files.pythonhosted.org/packages/e2/9a/6c586b0436903801afa70218025204c3828566a4c98cf8deadde35da8213/py_neuromodulation-0.0.3.tar.gz",
    "platform": null,
    "description": "py_neuromodulation\r\n==================\r\n\r\nAnalyzing neural data can be a troublesome, trial and error prone,\r\nand beginner unfriendly process. *py_neuromodulation* allows using a simple\r\ninterface for extraction of established neurophysiological features and includes commonly applied pre -and postprocessing methods.\r\n\r\nOnly **time series data** with a corresponding **sampling frequency** are required for feature extraction.\r\n\r\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,\r\nwhich resembles an *online* data-stream that can in theory also be be used with a hardware acquisition system. \r\n\r\nThe following features are currently included:\r\n\r\n* oscillatory: fft, stft or bandpass filtered band power\r\n* `temporal waveform shape <https://www.sciencedirect.com/science/article/pii/S1364661316302182>`_\r\n* `fooof <https://fooof-tools.github.io/fooof/>`_\r\n* `mne_connectivity estimates <https://mne.tools/mne-connectivity/stable/index.html>`_ \r\n* `Hjorth parameter <https://en.wikipedia.org/wiki/Hjorth_parameters>`_\r\n* `non-linear dynamical estimates <https://nolds.readthedocs.io/en/latest/>`_\r\n* various burst features\r\n* line length \r\n* and more...\r\n\r\n\r\nFind here the preprint of **py_neuromodulation** called *\"Invasive neurophysiology and whole brain connectomics for neural decoding in patients with brain implants\"* [1]_.\r\n\r\nThe original intention for writing this toolbox was movement decoding from invasive brain signals [2]_.\r\nThe application however could be any neural decoding problem.\r\n*py_neuromodulation* offers wrappers around common practice machine learning methods for efficient analysis.\r\n\r\nFind the documentation here http://py-neuromodulation.readthedocs.io for example usage and parametrization.\r\n\r\nInstallation\r\n============\r\n\r\npy_neuromodulation requires at least python 3.10. For installation you can use pip:\r\n\r\n.. code-block::\r\n\r\n    pip install py-neuromodulation\r\n\r\n\r\nWe recommend however installing the package using `rye <https://rye-up.com/guide/installation/>`_:\r\n\r\n.. code-block::\r\n\r\n    git clone https://github.com/neuromodulation/py_neuromodulation.git\r\n    rye pin 3.11\r\n    rye sync\r\n\r\nAnd then activating the virtual environment e.g. in Windows using:\r\n\r\n.. code-block::\r\n\r\n    .\\.venv\\Scripts\\activate\r\n\r\nAlternatively you can also install the package in a conda environment:\r\n\r\n    conda create -n pynm-test python=3.11\r\n    conda activate pynm-test\r\n\r\nThen install the packages listed in the `pyproject.toml`:\r\n\r\n.. code-block::\r\n\r\n    pip install .\r\n\r\n\r\nOptionally the ipython kernel can be specified for the installed pynm-test conda environment:\r\n\r\n.. code-block::\r\n\r\n    ipython kernel install --user --name=pynm-test\r\n\r\nThen *py_neuromodulation* can be imported via:\r\n\r\n.. code-block::\r\n\r\n    import py_neuromodulation as nm\r\n\r\nBasic Usage\r\n===========\r\n\r\n.. code-block:: python\r\n    \r\n    import py_neuromodulation as nm\r\n    import numpy as np\r\n    \r\n    NUM_CHANNELS = 5\r\n    NUM_DATA = 10000\r\n    sfreq = 1000  # Hz\r\n    sampling_rate_features_hz = 3  # Hz\r\n\r\n    data = np.random.random([NUM_CHANNELS, NUM_DATA])\r\n\r\n    stream = nm.Stream(sfreq=sfreq, data=data, sampling_rate_features_hz=sampling_rate_features_hz)\r\n    features = stream.run()\r\n\r\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.\r\n\r\nContact information\r\n-------------------\r\nFor any question or suggestion please find my contact\r\ninformation at `my GitHub profile <https://github.com/timonmerk>`_.\r\n\r\nReferences\r\n----------\r\n\r\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).\r\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).\r\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.3",
    "project_urls": {
        "bugtracker": "https://github.com/neuromodulation/py_neuromodulation/issues",
        "repository": "https://github.com/neuromodulation/py_neuromodulation"
    },
    "split_keywords": [
        "real-time",
        " eeg",
        " ieeg",
        " dbs",
        " ecog",
        " electrocorticography",
        " deep-brain-stimulation",
        " machine-learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5912ba17853ed220ebe40bce6657a68daec23d8b9ab6954aac2ef0fa68d5a3b",
                "md5": "461e5f1b0da128c6e8ca61606c014093",
                "sha256": "a020dbb5c6439acaefa0ae6d0476810387d2307114e1a5c74faf15cf80594373"
            },
            "downloads": -1,
            "filename": "py_neuromodulation-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "461e5f1b0da128c6e8ca61606c014093",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 387974,
            "upload_time": "2024-04-12T13:39:08",
            "upload_time_iso_8601": "2024-04-12T13:39:08.985356Z",
            "url": "https://files.pythonhosted.org/packages/c5/91/2ba17853ed220ebe40bce6657a68daec23d8b9ab6954aac2ef0fa68d5a3b/py_neuromodulation-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e29a6c586b0436903801afa70218025204c3828566a4c98cf8deadde35da8213",
                "md5": "0b026201f0f9811d97e178456f447308",
                "sha256": "85cd746f953e2ddffe7f2d24795c6e065bba990a2f979d94fa6c1f42dd6d5c2c"
            },
            "downloads": -1,
            "filename": "py_neuromodulation-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0b026201f0f9811d97e178456f447308",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 278901,
            "upload_time": "2024-04-12T13:39:10",
            "upload_time_iso_8601": "2024-04-12T13:39:10.780786Z",
            "url": "https://files.pythonhosted.org/packages/e2/9a/6c586b0436903801afa70218025204c3828566a4c98cf8deadde35da8213/py_neuromodulation-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-12 13:39:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "neuromodulation",
    "github_project": "py_neuromodulation",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "py-neuromodulation"
}
        
Elapsed time: 0.24019s