Esempio n. 1
0
def test_plot_topo_power():
    """Test plotting of power
    """
    epochs = _get_epochs()
    decim = 3
    frequencies = np.arange(7, 30, 3)  # define frequencies of interest
    power = np.abs(np.random.randn(n_chan, 7, 141))
    phase_lock = np.random.randn(n_chan, 7, 141)
    baseline = (None, 0)  # set the baseline for induced power
    title = 'Induced power - MNE sample data'
    plot_topo_power(epochs,
                    power,
                    frequencies,
                    layout,
                    baseline=baseline,
                    mode='ratio',
                    decim=decim,
                    vmin=0.,
                    vmax=14,
                    title=title)
    title = 'Phase locking value - MNE sample data'
    plot_topo_phase_lock(epochs,
                         phase_lock,
                         frequencies,
                         layout,
                         baseline=baseline,
                         mode='mean',
                         decim=decim,
                         title=title)
    plt.close('all')
Esempio n. 2
0
def test_plot_topo_power():
    """Test plotting of power
    """
    decim = 3
    frequencies = np.arange(7, 30, 3)  # define frequencies of interest
    power = np.abs(np.random.randn(n_chan, 7, 141))
    phase_lock = np.random.randn(n_chan, 7, 141)
    baseline = (None, 0)  # set the baseline for induced power
    title = 'Induced power - MNE sample data'
    plot_topo_power(epochs, power, frequencies, layout, baseline=baseline,
                    mode='ratio', decim=decim, vmin=0., vmax=14, title=title)
    title = 'Phase locking value - MNE sample data'
    plot_topo_phase_lock(epochs, phase_lock, frequencies, layout,
                         baseline=baseline, mode='mean', decim=decim,
                         title=title)
Esempio n. 3
0
def test_plot_topo_power():
    """Test plotting of power
    """
    epochs = _get_epochs()
    decim = 3
    frequencies = np.arange(7, 30, 3)  # define frequencies of interest
    power = np.abs(np.random.randn(n_chan, 7, 141))
    phase_lock = np.random.randn(n_chan, 7, 141)
    baseline = (None, 0)  # set the baseline for induced power
    title = "Induced power - MNE sample data"
    plot_topo_power(
        epochs, power, frequencies, layout, baseline=baseline, mode="ratio", decim=decim, vmin=0.0, vmax=14, title=title
    )
    title = "Phase locking value - MNE sample data"
    plot_topo_phase_lock(
        epochs, phase_lock, frequencies, layout, baseline=baseline, mode="mean", decim=decim, title=title
    )
    plt.close("all")
Esempio n. 4
0
Fs = raw.info['sfreq']  # sampling in Hz
decim = 3
power, phase_lock = induced_power(data, Fs=Fs, frequencies=frequencies,
                                  n_cycles=n_cycles, n_jobs=1, use_fft=False,
                                  decim=decim, zero_mean=True)

###############################################################################
# Prepare topography plots, set baseline correction parameters

baseline = (None, 0)  # set the baseline for induced power
mode = 'ratio'  # set mode for baseline rescaling

###############################################################################
# Show topography of power.

title = 'Induced power - MNE sample data'
plot_topo_power(epochs, power, frequencies, layout, baseline=baseline,
                mode=mode, decim=decim, vmin=0., vmax=14, title=title)
plt.show()

###############################################################################
# Show topography of phase locking value (PLV)

mode = None  # no baseline rescaling for PLV

title = 'Phase locking value - MNE sample data'
plot_topo_phase_lock(epochs, phase_lock, frequencies, layout,
                     baseline=baseline, mode=mode, decim=decim, title=title)

plt.show()
Esempio n. 5
0
title = 'Induced power - MNE sample data'
plot_topo_power(epochs,
                power,
                frequencies,
                layout,
                baseline=baseline,
                mode=mode,
                decim=decim,
                vmin=0.,
                vmax=14,
                title=title)
plt.show()

###############################################################################
# Show topography of phase locking value (PLV)

mode = None  # no baseline rescaling for PLV

title = 'Phase locking value - MNE sample data'
plot_topo_phase_lock(epochs,
                     phase_lock,
                     frequencies,
                     layout,
                     baseline=baseline,
                     mode=mode,
                     decim=decim,
                     title=title)

plt.show()