pystorm3


Namepystorm3 JSON
Version 0.1.18 PyPI version JSON
download
home_pagehttps://github.com/NeuroLife77/pystorm
SummaryPython implementation of some Brainstorm functions
upload_time2024-10-20 13:59:21
maintainerDominic Boutet
docs_urlNone
authorDominic Boutet
requires_python>=3.9
licenseGPL-3.0 license
keywords neuroscience neuroimaging neural oscillations time series analysis time frequency analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Pystorm logo](https://github.com/NeuroLife77/pystorm/blob/main/pystorm_logo.png?raw=true)
# Pystorm
Python implementation of various functions from the [Brainstorm](https://neuroimage.usc.edu/brainstorm/) [repository](https://github.com/brainstorm-tools/brainstorm3), often written for GPU compatibility and/or jit compilation.

## Note on the current scope of Pystorm
Pystorm does not handle interactions with Brainstorm or matlab and, in its current state, does not handle loading of data files. 

It mainly operates as a library of functions to perform operations on data directly (e.g., numpy array of sensor signals and imaging kernel). 

It aims to be lightweight, fast, and hopefully easily scalable to parallel computing and high performance computing.

It can be installed using pip through pypi where it is named **pystorm3**: 

`python -m pip install pystorm3` 

or

`pip install pystorm3`.

## Pystorm functions
### Note:
Currently experiencing issues with the scipy backend, so most new functions are only implemented with the pytorch backend and some functions (like band_pass) will default to the pytorch backend on cpu device if called from within another pystorm function that was set to the scipy backend.

### Currently implemented
- Power spectral density estimation ([PSD Welch method](https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/timefreq/bst_psd.m), physical units only) in source and sensor space (can operate on GPU)
- Time-resolved PSD (same as above function, but returns all windows instead of the average)
- FFT (only implemented with pytorch backend) that returns either the complex values or the power and phase values.
- Band-pass filtering (equivalent to ["bst-hfilter-2019"](https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/math/bst_bandpass_hfilter.m))
- Hilbert transform
- Amplitude envelope correlation (equivalent to ["penv" and "oenv"](https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/connectivity/bst_henv.m)). Also includes an option to apply it on source data directly or parcellated data (see extract parcel time series section for details)
- Extract parcel time series from the sensor data and the imaging kernel: requires the imaging kernel to be separated per parcel as a list of N matrices (1 per parcel) that only contain the rows of the sources within the parcels. It can be applied on either the mean of the sources time course within each parcel or on a PCA-based dimensionality reduction of the signal. 
- Sign flip based on cortical surface orientations for parcellated source signal
- PAC and [tPAC](https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/process/functions/process_pac_dynamic.m) (time-resolved Phase-Amplitude Coupling) with [surrogate data z-score](https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/process/functions/process_pac_dynamic_sur2.m)
- Morlet wavelet coefficients. Only implemented with pytorch backend and does not speed up the convolution with FFT.
- Phase lag index (including PLI,wPLI,dwPLI). Works both in source space and sensor space.

### Coming soon
- TBD

### Currently not implemented
- Handling of unconstrained sources

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/NeuroLife77/pystorm",
    "name": "pystorm3",
    "maintainer": "Dominic Boutet",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "dominic.boutet@mail.mcgill.ca",
    "keywords": "neuroscience, neuroimaging, neural oscillations, time series analysis, time frequency analysis",
    "author": "Dominic Boutet",
    "author_email": "dominic.boutet@mail.mcgill.ca",
    "download_url": "https://files.pythonhosted.org/packages/49/11/31b3862f3f0a9b1d8ec04c149e9b39fd58b2b43567832152c9530851726e/pystorm3-0.1.18.tar.gz",
    "platform": null,
    "description": "![Pystorm logo](https://github.com/NeuroLife77/pystorm/blob/main/pystorm_logo.png?raw=true)\n# Pystorm\nPython implementation of various functions from the [Brainstorm](https://neuroimage.usc.edu/brainstorm/) [repository](https://github.com/brainstorm-tools/brainstorm3), often written for GPU compatibility and/or jit compilation.\n\n## Note on the current scope of Pystorm\nPystorm does not handle interactions with Brainstorm or matlab and, in its current state, does not handle loading of data files. \n\nIt mainly operates as a library of functions to perform operations on data directly (e.g., numpy array of sensor signals and imaging kernel). \n\nIt aims to be lightweight, fast, and hopefully easily scalable to parallel computing and high performance computing.\n\nIt can be installed using pip through pypi where it is named **pystorm3**: \n\n`python -m pip install pystorm3` \n\nor\n\n`pip install pystorm3`.\n\n## Pystorm functions\n### Note:\nCurrently experiencing issues with the scipy backend, so most new functions are only implemented with the pytorch backend and some functions (like band_pass) will default to the pytorch backend on cpu device if called from within another pystorm function that was set to the scipy backend.\n\n### Currently implemented\n- Power spectral density estimation ([PSD Welch method](https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/timefreq/bst_psd.m), physical units only) in source and sensor space (can operate on GPU)\n- Time-resolved PSD (same as above function, but returns all windows instead of the average)\n- FFT (only implemented with pytorch backend) that returns either the complex values or the power and phase values.\n- Band-pass filtering (equivalent to [\"bst-hfilter-2019\"](https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/math/bst_bandpass_hfilter.m))\n- Hilbert transform\n- Amplitude envelope correlation (equivalent to [\"penv\" and \"oenv\"](https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/connectivity/bst_henv.m)). Also includes an option to apply it on source data directly or parcellated data (see extract parcel time series section for details)\n- Extract parcel time series from the sensor data and the imaging kernel: requires the imaging kernel to be separated per parcel as a list of N matrices (1 per parcel) that only contain the rows of the sources within the parcels. It can be applied on either the mean of the sources time course within each parcel or on a PCA-based dimensionality reduction of the signal. \n- Sign flip based on cortical surface orientations for parcellated source signal\n- PAC and [tPAC](https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/process/functions/process_pac_dynamic.m) (time-resolved Phase-Amplitude Coupling) with [surrogate data z-score](https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/process/functions/process_pac_dynamic_sur2.m)\n- Morlet wavelet coefficients. Only implemented with pytorch backend and does not speed up the convolution with FFT.\n- Phase lag index (including PLI,wPLI,dwPLI). Works both in source space and sensor space.\n\n### Coming soon\n- TBD\n\n### Currently not implemented\n- Handling of unconstrained sources\n",
    "bugtrack_url": null,
    "license": "GPL-3.0 license",
    "summary": "Python implementation of some Brainstorm functions",
    "version": "0.1.18",
    "project_urls": {
        "Homepage": "https://github.com/NeuroLife77/pystorm"
    },
    "split_keywords": [
        "neuroscience",
        " neuroimaging",
        " neural oscillations",
        " time series analysis",
        " time frequency analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1541592ff3a0446b55a59f5bd687b943d5dacd3be640a817f1252b23ba6af37",
                "md5": "8f96d6427a60e45ebb79776b84900af7",
                "sha256": "10a878d1b3a9f0ff421175482d191136b4230597994d79e1d6706ad2a735b88e"
            },
            "downloads": -1,
            "filename": "pystorm3-0.1.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8f96d6427a60e45ebb79776b84900af7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 53381,
            "upload_time": "2024-10-20T13:59:19",
            "upload_time_iso_8601": "2024-10-20T13:59:19.394256Z",
            "url": "https://files.pythonhosted.org/packages/a1/54/1592ff3a0446b55a59f5bd687b943d5dacd3be640a817f1252b23ba6af37/pystorm3-0.1.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "491131b3862f3f0a9b1d8ec04c149e9b39fd58b2b43567832152c9530851726e",
                "md5": "86b89591e1874e81c65064a0fa8a62ca",
                "sha256": "9e265458d63aea0a6bf170f2df4549ebadeb53ad252a265422a1531673261f3d"
            },
            "downloads": -1,
            "filename": "pystorm3-0.1.18.tar.gz",
            "has_sig": false,
            "md5_digest": "86b89591e1874e81c65064a0fa8a62ca",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 46804,
            "upload_time": "2024-10-20T13:59:21",
            "upload_time_iso_8601": "2024-10-20T13:59:21.079822Z",
            "url": "https://files.pythonhosted.org/packages/49/11/31b3862f3f0a9b1d8ec04c149e9b39fd58b2b43567832152c9530851726e/pystorm3-0.1.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-20 13:59:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NeuroLife77",
    "github_project": "pystorm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pystorm3"
}
        
Elapsed time: 0.38830s