Skip to main content

Artifact Subspace Reconstruction in Python.

Project description

[!WARNING]
This toolbox is currently not actively maintained. I would love to, but we all know that the incentives set for scientists don't really encourage work like this. :')


ASRpy

Artifact Subspace Reconstruction for Python

Tests codecov PyPI version License

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-0.0.5.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asrpy-0.0.5-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file asrpy-0.0.5.tar.gz.

File metadata

  • Download URL: asrpy-0.0.5.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for asrpy-0.0.5.tar.gz
Algorithm Hash digest
SHA256 4c8ed1c532b9ff2b9756927de4c7797b9b57e06432b1d036f99a21d90792bf00
MD5 a6e906eaf0710f3a341bef9219d37e4d
BLAKE2b-256 fcab87ea910e424278fd35d24d05501bae50200aebd9a5e0813ce8d3a0a552f1

See more details on using hashes here.

File details

Details for the file asrpy-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: asrpy-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for asrpy-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cbd956f580b80fb15cf8e579d248eb9498df5f60ceb771961a57c4e99f647b9a
MD5 ec1587795188f3e979d7188790992fcc
BLAKE2b-256 370b97d782585c67e49b9c89321c588b1f4a53b14a8efd262a8b5cc0613f36e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page