本文整理汇总了Python中mne.Epochs.plot_image方法的典型用法代码示例。如果您正苦于以下问题:Python Epochs.plot_image方法的具体用法?Python Epochs.plot_image怎么用?Python Epochs.plot_image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mne.Epochs
的用法示例。
在下文中一共展示了Epochs.plot_image方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: define_target_events
# 需要导入模块: from mne import Epochs [as 别名]
# 或者: from mne.Epochs import plot_image [as 别名]
# define target events:
# 1. find response times: distance between "square" and "rt" events
# 2. extract A. "square" events B. followed by a button press within 700 msec
tmax = .7
sfreq = raw.info["sfreq"]
reference_id, target_id = 2, 1
new_events, rts = define_target_events(events, reference_id, target_id, sfreq,
tmin=0., tmax=tmax, new_id=2)
epochs = Epochs(raw, events=new_events, tmax=tmax + .1,
event_id={"square": 2}, picks=picks)
###############################################################################
# Plot
# Parameters for plotting
order = rts.argsort() # sorting from fast to slow trials
rois = dict()
for pick, channel in enumerate(epochs.ch_names):
last_char = channel[-1] # for 10/20, last letter codes the hemisphere
roi = ("Midline" if last_char == "z" else
("Left" if int(last_char) % 2 else "Right"))
rois[roi] = rois.get(roi, list()) + [pick]
# The actual plots
for combine_measures in ('gfp', 'median'):
epochs.plot_image(group_by=rois, order=order, overlay_times=rts / 1000.,
sigma=1.5, combine=combine_measures,
ts_args=dict(vlines=[0, rts.mean() / 1000.]))