Coder Social home page Coder Social logo

asrpy's Introduction

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?

asrpy's People

Contributors

digyt avatar spebern avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.