本文整理汇总了Python中mne.io.Raw.info["lowpass"]方法的典型用法代码示例。如果您正苦于以下问题:Python Raw.info["lowpass"]方法的具体用法?Python Raw.info["lowpass"]怎么用?Python Raw.info["lowpass"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mne.io.Raw
的用法示例。
在下文中一共展示了Raw.info["lowpass"]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_chpi_subtraction
# 需要导入模块: from mne.io import Raw [as 别名]
# 或者: from mne.io.Raw import info["lowpass"] [as 别名]
def test_chpi_subtraction():
"""Test subtraction of cHPI signals"""
raw = Raw(chpi_fif_fname, allow_maxshield="yes", preload=True)
with catch_logging() as log:
filter_chpi(raw, include_line=False, verbose=True)
assert_true("5 cHPI" in log.getvalue())
# MaxFilter doesn't do quite as well as our algorithm with the last bit
raw.crop(0, 16, copy=False)
# remove cHPI status chans
raw_c = Raw(sss_hpisubt_fname).crop(0, 16, copy=False).load_data()
raw_c.pick_types(meg=True, eeg=True, eog=True, ecg=True, stim=True, misc=True)
assert_meg_snr(raw, raw_c, 143, 624)
# Degenerate cases
raw_nohpi = Raw(test_fif_fname, preload=True)
assert_raises(RuntimeError, filter_chpi, raw_nohpi)
# When MaxFliter downsamples, like::
# $ maxfilter -nosss -ds 2 -f test_move_anon_raw.fif \
# -o test_move_anon_ds2_raw.fif
# it can strip out some values of info, which we emulate here:
raw = Raw(chpi_fif_fname, allow_maxshield="yes")
with warnings.catch_warnings(record=True): # uint cast suggestion
raw = raw.crop(0, 1).load_data().resample(600.0, npad="auto")
raw.info["buffer_size_sec"] = np.float64(2.0)
raw.info["lowpass"] = 200.0
del raw.info["maxshield"]
del raw.info["hpi_results"][0]["moments"]
del raw.info["hpi_subsystem"]["event_channel"]
with catch_logging() as log:
filter_chpi(raw, verbose=True)
assert_true("2 cHPI" in log.getvalue())