本文整理汇总了Python中mne.io.Raw.info['chs'][13]['loc'][:3]方法的典型用法代码示例。如果您正苦于以下问题:Python Raw.info['chs'][13]['loc'][:3]方法的具体用法?Python Raw.info['chs'][13]['loc'][:3]怎么用?Python Raw.info['chs'][13]['loc'][:3]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mne.io.Raw
的用法示例。
在下文中一共展示了Raw.info['chs'][13]['loc'][:3]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_set_sensor_positions
# 需要导入模块: from mne.io import Raw [as 别名]
# 或者: from mne.io.Raw import info['chs'][13]['loc'][:3] [as 别名]
def test_get_set_sensor_positions():
"""Test get/set functions for sensor positions
"""
raw1 = Raw(raw_fname)
picks = pick_types(raw1.info, meg=False, eeg=True)
pos = np.array([ch['loc'][:3] for ch in raw1.info['chs']])[picks]
raw_pos = raw1.get_channel_positions(picks=picks)
assert_array_equal(raw_pos, pos)
ch_name = raw1.info['ch_names'][13]
assert_raises(ValueError, raw1.set_channel_positions, [1, 2], ['name'])
raw2 = Raw(raw_fname)
raw2.info['chs'][13]['loc'][:3] = np.array([1, 2, 3])
raw1.set_channel_positions([[1, 2, 3]], [ch_name])
assert_array_equal(raw1.info['chs'][13]['loc'],
raw2.info['chs'][13]['loc'])