{ "nbformat_minor": 0, "nbformat": 4, "cells": [ { "execution_count": null, "cell_type": "code", "source": [ "%matplotlib inline" ], "outputs": [], "metadata": { "collapsed": false } }, { "source": [ "\n# Plot an estimate of data SNR\n\n\nThis estimates the SNR as a function of time for a set of data.\n\n" ], "cell_type": "markdown", "metadata": {} }, { "execution_count": null, "cell_type": "code", "source": [ "# Author: Eric Larson \n#\n# License: BSD (3-clause)\n\nfrom os import path as op\n\nfrom mne.datasets.sample import data_path\nfrom mne.minimum_norm import read_inverse_operator\nfrom mne import read_evokeds\nfrom mne.viz import plot_snr_estimate\n\nprint(__doc__)\n\ndata_dir = op.join(data_path(), 'MEG', 'sample')\nfname_inv = op.join(data_dir, 'sample_audvis-meg-oct-6-meg-inv.fif')\nfname_evoked = op.join(data_dir, 'sample_audvis-ave.fif')\n\ninv = read_inverse_operator(fname_inv)\nevoked = read_evokeds(fname_evoked, baseline=(None, 0))[0]\n\nplot_snr_estimate(evoked, inv)" ], "outputs": [], "metadata": { "collapsed": false } } ], "metadata": { "kernelspec": { "display_name": "Python 2", "name": "python2", "language": "python" }, "language_info": { "mimetype": "text/x-python", "nbconvert_exporter": "python", "name": "python", "file_extension": ".py", "version": "2.7.13", "pygments_lexer": "ipython2", "codemirror_mode": { "version": 2, "name": "ipython" } } } }