Python mne.viz() Examples
The following are 1
code examples of mne.viz().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
mne
, or try the search function
.
Example #1
Source File: beamformers_electrodes_tweak.py From mmvt with GNU General Public License v3.0 | 6 votes |
def plot_td_dics(events_id, bipolar, tmin_plot, tmax_plot, freq_bins): from mne.viz import plot_source_spectrogram from mne.source_estimate import _make_stc # Plotting source spectrogram for source with maximum activity # Note that tmin and tmax are set to display a time range that is smaller than # the one for which beamforming estimates were calculated. This ensures that # all time bins shown are a result of smoothing across an identical number of # time windows. region = 'bipolar_electrodes' if bipolar else 'regular_electrodes' data_fol = os.path.join(SUBJECT_MEG_FOL, 'subcorticals', 'dics', 'all_{}'.format(region)) stcs = [] for event in events_id.keys(): stcs.append(tf.load_stcs(event, freq_bins, data_fol, MRI_SUBJECT)) # plot_source_spectrogram(stcs[-1], freq_bins, tmin=tmin_plot, tmax=tmax_plot, # source_index=None, colorbar=True) stcs_diff = [] for stc1, stc2 in zip(stcs[0], stcs[1]): stc_diff = _make_stc(stc1.data - stc2.data, vertices=stc1.vertices, tmin=stc1.tmin, tstep=stc1.tstep, subject=stc1.subject) stcs_diff.append(stc_diff) plot_source_spectrogram(stcs_diff, freq_bins, tmin=tmin_plot, tmax=tmax_plot, source_index=None, colorbar=True)