Skip to main content

Artifact Subspace Reconstruction in Python.

Project description

ASRpy

Artifact Subspace Reconstruction for Python

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 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. For an alternative implementation check their repository.

References

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:

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. You can simply run them via your internet browser (on Google Colab's hosted runtime) by clicking the button below.

Open in Colab

Documentation

The ASRpy documentation is created using pdoc3 and GitHub Pages. Click on the link below to view the documentation.

Documentation

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

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

asrpy_eh-0.0.4.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

asrpy_eh-0.0.4-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file asrpy_eh-0.0.4.tar.gz.

File metadata

  • Download URL: asrpy_eh-0.0.4.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for asrpy_eh-0.0.4.tar.gz
Algorithm Hash digest
SHA256 a8663a100f50cd825ee2157bcd66aec9169fdba08bcee2bdab45f50f35d03bd1
MD5 8bd1b87a6286efdc48db25408e07183b
BLAKE2b-256 fa249996a1f7f699dcc76e8bf99efd6b732e8f01177fa5fd1768e5252bceb939

See more details on using hashes here.

File details

Details for the file asrpy_eh-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: asrpy_eh-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for asrpy_eh-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 aa6f27e1cf22d7a181fe5465c4106f1f0cc168cef1230abceb651d1048d2b3d9
MD5 c5d8564642f33f6c4ac66dca010b7eba
BLAKE2b-256 a2359f969ed73d339d91f3e2a8ed0432fd71ee38e68703258a8c10da62f59c00

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