本文整理汇总了Python中mne.io.Raw.info['chs'][1]['kind']方法的典型用法代码示例。如果您正苦于以下问题:Python Raw.info['chs'][1]['kind']方法的具体用法?Python Raw.info['chs'][1]['kind']怎么用?Python Raw.info['chs'][1]['kind']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mne.io.Raw
的用法示例。
在下文中一共展示了Raw.info['chs'][1]['kind']方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: artifacts
# 需要导入模块: from mne.io import Raw [as 别名]
# 或者: from mne.io.Raw import info['chs'][1]['kind'] [as 别名]
# 2) identify bad components by analyzing latent sources.
title = 'Sources related to %s artifacts (red)'
# generate ECG epochs use detection via phase statistics
picks = mne.pick_types(raw.info, meg=True, eeg=False, eog=True, ecg=True, stim=False, exclude='bads')
# create_ecg_epochs is strange: it strips the channels of anything non M/EEG
# UNLESS picks=None
#picks=None
# This will work with the above, but uses MASSIVE RAM
# Not sure the ECG quality is good enough for the QRS-detector
ecg_inds, scores = ica.find_bads_ecg(raw, method='ctps', ch_name='ECG002', threshold=0.25)
if len(ecg_inds) < 1:
# destroy the ECG channel by changing it to an EMG!
raw.info['chs'][1]['kind'] = 302
# then try to generate ECG from mags
ecg_inds, scores = ica.find_bads_ecg(raw, method='ctps', ch_name='ECG002', threshold=0.25)
if len(ecg_inds) > 0:
fig = ica.plot_scores(scores, exclude=ecg_inds, title=title % 'ecg')
fig.savefig(img_prefix + '_ecg_scores.png')
show_picks = np.abs(scores).argsort()[::-1][:n_max_ecg]
fig = ica.plot_sources(raw, show_picks, exclude=ecg_inds, start=t_start, stop=t_stop, title=title % 'ecg')
fig.savefig(img_prefix + '_ecg_sources.png')
fig = ica.plot_components(ecg_inds, title=title % 'ecg', colorbar=True)
fig.set_size_inches(9.,6.)
fig.savefig(img_prefix + '_ecg_components.png')