asrpy-eh


Nameasrpy-eh JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/DiGyt/asrpy
SummaryArtifact Subspace Reconstruction in Python.
upload_time2024-02-02 06:08:20
maintainer
docs_urlNone
authorDirk Gütlin
requires_python
licenseBSD-3
keywords eeg meg signal processing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ASRpy
Artifact Subspace Reconstruction for Python


- [Introduction](#introduction)
- [Installation](#installation)
- [Examples](#examples)
- [Documentation](#documentation)


## Introduction

Artifact subspace reconstruction (ASR) is an automated, online,
component-based artifact removal method for removing transient or
large-amplitude artifacts in multi-channel EEG recordings (Kothe & Jung, 
2016). This repository provides a Python implementation of the standard 
ASR algorithm, similar to the original MATLAB implementation in EEGLab's 
[`clean_rawdata`](https://github.com/sccn/clean_rawdata) plugin.
As of now, this repository only implements the standard version of 
the ASR algorithm. A valid version of the improved _riemannian_ ASR 
(Blum et al., 2019) might be added in the future.

This implementation aims to follow the original ASR algorithm as close 
as possible. Using the according parameters, it should be perfectly 
equivalent to the original implementation, except for a few imprecisions
introduced by different solvers implemented in Python and MATLAB, e.g. 
when calculating the eigenspace. However, this implementation is 
based on [python_meegkit](https://github.com/nbara/python-meegkit). 
For an alternative implementation check their repository.

#### References

- Kothe, C. A. E., & Jung, T. P. (2016). U.S. Patent Application No. 
14/895,440. https://patents.google.com/patent/US20160113587A1/en
- Blum, S., Jacobsen, N. S. J., Bleichner, M. G., & Debener, S. (2019). 
A Riemannian Modification of Artifact Subspace Reconstruction for EEG 
Artifact Handling. Frontiers in Human Neuroscience, 13. 
https://doi.org/10.3389/fnhum.2019.00141
   
   
## Installation

You can install the latest ASRpy release using:
```
pip install asrpy
```
or install the current working version directly from GitHub, using:
```
pip install git+https://github.com/DiGyt/asrpy.git
```


## Examples

ASRpy applies the Artifact Subspace Reconstruction method directly to MNE-Python's `mne.io.Raw` objects. It's usage should be as simple as:
```python
import asrpy
asr = asrpy.ASR(sfreq=raw.info["sfreq"], cutoff=20)
asr.fit(raw)
raw = asr.transform(raw)
```

To get started, we recommend going through the [example notebook](https://github.com/DiGyt/asrpy/blob/main/example.ipynb). You can simply run them via your internet browser (on Google Colab's hosted runtime) by clicking the  button below.

[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DiGyt/asrpy/blob/main/example.ipynb)


## Documentation

The ASRpy documentation is created using [pdoc3](https://pdoc3.github.io/pdoc/) and [GitHub Pages](https://pages.github.com/). Click on the link below to view the documentation.

[Documentation](https://digyt.github.io/asrpy/)

In most Python IDEs, you can also read them by e.g. typing `asrpy.ASR?`


<!-- 
Note for myself: build the documentation with:
cd . #asrpy head dir
pdoc3 --html --output-dir docs asrpy -f -c sort_identifiers=False

Second Note: Deploy on PyPI like:
git clone https://github.com/DiGyt/asrpy.git
pip install asrpy/.
rm -rf dist
python asrpy/setup.py sdist
python asrpy/setup.py bdist_wheel
pip install twine
twine check dist/*
twine upload dist/*
-->






            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DiGyt/asrpy",
    "name": "asrpy-eh",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "EEG MEG Signal Processing",
    "author": "Dirk G\u00fctlin",
    "author_email": "dirk.guetlin@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "# ASRpy\r\nArtifact Subspace Reconstruction for Python\r\n\r\n\r\n- [Introduction](#introduction)\r\n- [Installation](#installation)\r\n- [Examples](#examples)\r\n- [Documentation](#documentation)\r\n\r\n\r\n## Introduction\r\n\r\nArtifact subspace reconstruction (ASR) is an automated, online,\r\ncomponent-based artifact removal method for removing transient or\r\nlarge-amplitude artifacts in multi-channel EEG recordings (Kothe & Jung, \r\n2016). This repository provides a Python implementation of the standard \r\nASR algorithm, similar to the original MATLAB implementation in EEGLab's \r\n[`clean_rawdata`](https://github.com/sccn/clean_rawdata) plugin.\r\nAs of now, this repository only implements the standard version of \r\nthe ASR algorithm. A valid version of the improved _riemannian_ ASR \r\n(Blum et al., 2019) might be added in the future.\r\n\r\nThis implementation aims to follow the original ASR algorithm as close \r\nas possible. Using the according parameters, it should be perfectly \r\nequivalent to the original implementation, except for a few imprecisions\r\nintroduced by different solvers implemented in Python and MATLAB, e.g. \r\nwhen calculating the eigenspace. However, this implementation is \r\nbased on [python_meegkit](https://github.com/nbara/python-meegkit). \r\nFor an alternative implementation check their repository.\r\n\r\n#### References\r\n\r\n- Kothe, C. A. E., & Jung, T. P. (2016). U.S. Patent Application No. \r\n14/895,440. https://patents.google.com/patent/US20160113587A1/en\r\n- Blum, S., Jacobsen, N. S. J., Bleichner, M. G., & Debener, S. (2019). \r\nA Riemannian Modification of Artifact Subspace Reconstruction for EEG \r\nArtifact Handling. Frontiers in Human Neuroscience, 13. \r\nhttps://doi.org/10.3389/fnhum.2019.00141\r\n   \r\n   \r\n## Installation\r\n\r\nYou can install the latest ASRpy release using:\r\n```\r\npip install asrpy\r\n```\r\nor install the current working version directly from GitHub, using:\r\n```\r\npip install git+https://github.com/DiGyt/asrpy.git\r\n```\r\n\r\n\r\n## Examples\r\n\r\nASRpy applies the Artifact Subspace Reconstruction method directly to MNE-Python's `mne.io.Raw` objects. It's usage should be as simple as:\r\n```python\r\nimport asrpy\r\nasr = asrpy.ASR(sfreq=raw.info[\"sfreq\"], cutoff=20)\r\nasr.fit(raw)\r\nraw = asr.transform(raw)\r\n```\r\n\r\nTo get started, we recommend going through the [example notebook](https://github.com/DiGyt/asrpy/blob/main/example.ipynb). You can simply run them via your internet browser (on Google Colab's hosted runtime) by clicking the  button below.\r\n\r\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DiGyt/asrpy/blob/main/example.ipynb)\r\n\r\n\r\n## Documentation\r\n\r\nThe ASRpy documentation is created using [pdoc3](https://pdoc3.github.io/pdoc/) and [GitHub Pages](https://pages.github.com/). Click on the link below to view the documentation.\r\n\r\n[Documentation](https://digyt.github.io/asrpy/)\r\n\r\nIn most Python IDEs, you can also read them by e.g. typing `asrpy.ASR?`\r\n\r\n\r\n<!-- \r\nNote for myself: build the documentation with:\r\ncd . #asrpy head dir\r\npdoc3 --html --output-dir docs asrpy -f -c sort_identifiers=False\r\n\r\nSecond Note: Deploy on PyPI like:\r\ngit clone https://github.com/DiGyt/asrpy.git\r\npip install asrpy/.\r\nrm -rf dist\r\npython asrpy/setup.py sdist\r\npython asrpy/setup.py bdist_wheel\r\npip install twine\r\ntwine check dist/*\r\ntwine upload dist/*\r\n-->\r\n\r\n\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "BSD-3",
    "summary": "Artifact Subspace Reconstruction in Python.",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/DiGyt/asrpy"
    },
    "split_keywords": [
        "eeg",
        "meg",
        "signal",
        "processing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cebba0ff956e0e2f80e93a4ad18c230e3ba2e378842dfc4a2874e4a8a5fa70ac",
                "md5": "4ba2766c6658689e56037d5c4ab6f062",
                "sha256": "4538db10bc8bfeb77849d5f6e9db5d3182b7d4bbaa4e167ed8c941795944860a"
            },
            "downloads": -1,
            "filename": "asrpy_eh-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4ba2766c6658689e56037d5c4ab6f062",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 20036,
            "upload_time": "2024-02-02T06:08:20",
            "upload_time_iso_8601": "2024-02-02T06:08:20.562415Z",
            "url": "https://files.pythonhosted.org/packages/ce/bb/a0ff956e0e2f80e93a4ad18c230e3ba2e378842dfc4a2874e4a8a5fa70ac/asrpy_eh-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-02 06:08:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DiGyt",
    "github_project": "asrpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "asrpy-eh"
}
        
Elapsed time: 1.88271s