本文整理汇总了Python中mne.Epochs.standard_error方法的典型用法代码示例。如果您正苦于以下问题:Python Epochs.standard_error方法的具体用法?Python Epochs.standard_error怎么用?Python Epochs.standard_error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mne.Epochs
的用法示例。
在下文中一共展示了Epochs.standard_error方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_evoked_standard_error
# 需要导入模块: from mne import Epochs [as 别名]
# 或者: from mne.Epochs import standard_error [as 别名]
def test_evoked_standard_error():
"""Test calculation and read/write of standard error
"""
epochs = Epochs(raw, events[:4], event_id, tmin, tmax, picks=picks,
baseline=(None, 0))
evoked = [epochs.average(), epochs.standard_error()]
io.write_evokeds(op.join(tempdir, 'evoked.fif'), evoked)
evoked2 = read_evokeds(op.join(tempdir, 'evoked.fif'), [0, 1])
evoked3 = [read_evokeds(op.join(tempdir, 'evoked.fif'), 'Unknown'),
read_evokeds(op.join(tempdir, 'evoked.fif'), 'Unknown',
kind='standard_error')]
for evoked_new in [evoked2, evoked3]:
assert_true(evoked_new[0]._aspect_kind ==
FIFF.FIFFV_ASPECT_AVERAGE)
assert_true(evoked_new[0].kind == 'average')
assert_true(evoked_new[1]._aspect_kind ==
FIFF.FIFFV_ASPECT_STD_ERR)
assert_true(evoked_new[1].kind == 'standard_error')
for ave, ave2 in zip(evoked, evoked_new):
assert_array_almost_equal(ave.data, ave2.data)
assert_array_almost_equal(ave.times, ave2.times)
assert_equal(ave.nave, ave2.nave)
assert_equal(ave._aspect_kind, ave2._aspect_kind)
assert_equal(ave.kind, ave2.kind)
assert_equal(ave.last, ave2.last)
assert_equal(ave.first, ave2.first)
示例2: test_evoked_standard_error
# 需要导入模块: from mne import Epochs [as 别名]
# 或者: from mne.Epochs import standard_error [as 别名]
def test_evoked_standard_error():
"""Test calculation and read/write of standard error
"""
epochs = Epochs(raw, events[:4], event_id, tmin, tmax, picks=picks,
baseline=(None, 0))
evoked = [epochs.average(), epochs.standard_error()]
fiff.write_evoked('evoked.fif', evoked)
evoked2 = fiff.read_evoked('evoked.fif', [0, 1])
assert_true(evoked2[0].aspect_kind == fiff.FIFF.FIFFV_ASPECT_AVERAGE)
assert_true(evoked2[1].aspect_kind == fiff.FIFF.FIFFV_ASPECT_STD_ERR)
for ave, ave2 in zip(evoked, evoked2):
assert_array_almost_equal(ave.data, ave2.data)
assert_array_almost_equal(ave.times, ave2.times)
assert_equal(ave.nave, ave2.nave)
assert_equal(ave.aspect_kind, ave2.aspect_kind)
assert_equal(ave.last, ave2.last)
assert_equal(ave.first, ave2.first)