当前位置: 首页>>代码示例>>Python>>正文


Python mne.viz方法代码示例

本文整理汇总了Python中mne.viz方法的典型用法代码示例。如果您正苦于以下问题:Python mne.viz方法的具体用法?Python mne.viz怎么用?Python mne.viz使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mne的用法示例。


在下文中一共展示了mne.viz方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: plot_td_dics

# 需要导入模块: import mne [as 别名]
# 或者: from mne import viz [as 别名]
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) 
开发者ID:pelednoam,项目名称:mmvt,代码行数:25,代码来源:beamformers_electrodes_tweak.py


注:本文中的mne.viz方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。