def test_plot_image_epochs(): """Test plotting of epochs image """ import matplotlib.pyplot as plt epochs = _get_epochs() plot_image_epochs(epochs, picks=[1, 2]) plt.close('all')
def test_plot_epochs_image(): """Test plotting of epochs image """ import matplotlib.pyplot as plt epochs = _get_epochs() plot_epochs_image(epochs, picks=[1, 2]) plt.close('all') with warnings.catch_warnings(record=True): plot_image_epochs(epochs, picks=[1, 2]) plt.close('all')
def test_plot_image_epochs(): """Test plotting of epochs image """ epochs = _get_epochs() plot_image_epochs(epochs, picks=[1, 2]) plt.close('all')
def test_plot_image_epochs(): """Test plotting of epochs image """ plot_image_epochs(epochs, picks=[1, 2])
# Setup for reading the raw data raw = io.Raw(raw_fname, preload=True) raw.filter(1, 20, method='iir') # replace baselining with high-pass events = read_events(event_fname) raw.info['bads'] = ['MEG 2443'] # set bad channels picks = pick_types(raw.info, meg=True, eeg=False, stim=False, eog=False, exclude='bads') # Epoching epochs = Epochs(raw, events, event_id, tmin, tmax, proj=False, picks=picks, baseline=None, preload=True, add_eeg_ref=False, verbose=False) # Plot image epoch before xdawn plot_image_epochs(epochs['vis_r'], picks=[230], vmin=-500, vmax=500) # Estimates signal covariance signal_cov = compute_raw_data_covariance(raw, picks=picks) # Xdawn instance xd = Xdawn(n_components=2, signal_cov=signal_cov) # Fit xdawn xd.fit(epochs) # Denoise epochs epochs_denoised = xd.apply(epochs) # Plot image epoch after xdawn plot_image_epochs(epochs_denoised['vis_r'], picks=[230], vmin=-500, vmax=500)