{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n\n# Repairing artifacts with SSP\n\nThis tutorial covers the basics of signal-space projection (SSP) and shows\nhow SSP can be used for artifact repair; extended examples illustrate use\nof SSP for environmental noise reduction, and for repair of ocular and\nheartbeat artifacts.\n :depth: 2\n\nWe begin as always by importing the necessary Python modules. To save ourselves\nfrom repeatedly typing ``mne.preprocessing`` we'll directly import a handful of\nfunctions from that submodule:\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import os\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport mne\nfrom mne.preprocessing import (create_eog_epochs, create_ecg_epochs,\n compute_proj_ecg, compute_proj_eog)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
Before applying SSP (or any artifact repair strategy), be sure to observe\n the artifacts in your data to make sure you choose the right repair tool.\n Sometimes the right tool is no tool at all \u2014 if the artifacts are small\n enough you may not even need to repair them to get good analysis results.\n See `tut-artifact-overview` for guidance on detecting and\n visualizing various types of artifact.
:func:`~mne.preprocessing.compute_proj_ecg` has a similar parameter\n ``flat`` for specifying the *minimum* acceptable peak-to-peak amplitude\n for each channel type.