当前位置: 首页>>代码示例>>Python>>正文


Python EEGsynth.initialize_online_filter方法代码示例

本文整理汇总了Python中EEGsynth.initialize_online_filter方法的典型用法代码示例。如果您正苦于以下问题:Python EEGsynth.initialize_online_filter方法的具体用法?Python EEGsynth.initialize_online_filter怎么用?Python EEGsynth.initialize_online_filter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EEGsynth的用法示例。


在下文中一共展示了EEGsynth.initialize_online_filter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: range

# 需要导入模块: import EEGsynth [as 别名]
# 或者: from EEGsynth import initialize_online_filter [as 别名]
for i in range(0,len(left)):
    if f_shift == 'linear':
        left_f[i] = f_offset * (i + 1)
    else:
        left_f[i] = f_offset * 2**i

    if sideband == 'usb':
        highpass = left_f[i]
        lowpass = None
    elif sideband == 'lsb':
        highpass = None
        lowpass = left_f[i]
    else:
        highpass = None
        lowpass = None
    left_b[i], left_a[i], left_zi[i] = EEGsynth.initialize_online_filter(hdr_output.fSample, highpass, lowpass, f_order, dat_output)

for i in range(0,len(right)):
    if f_shift == 'linear':
        right_f[i] = f_offset * (i + 1)
    else:
        right_f[i] = f_offset * 2**i

    if sideband == 'usb':
        highpass = right_f[i]
        lowpass = None
    elif sideband == 'lsb':
        highpass = None
        lowpass = right_f[i]
    else:
        highpass = None
开发者ID:neuroidss,项目名称:eegsynth,代码行数:33,代码来源:sonification.py

示例2: print

# 需要导入模块: import EEGsynth [as 别名]
# 或者: from EEGsynth import initialize_online_filter [as 别名]
        print("read        ", window, "samples in", (time.time()-start)*1000, "ms")

    # Online filtering
    highpassfilter = patch.getfloat('processing', 'highpassfilter', default=None)
    if highpassfilter != None:
        highpassfilter = EEGsynth.rescale(highpassfilter, slope=scale_highpass, offset=offset_highpass)
    lowpassfilter = patch.getfloat('processing', 'lowpassfilter', default=None)
    if lowpassfilter != None:
        lowpassfilter = EEGsynth.rescale(lowpassfilter, slope=scale_lowpass, offset=offset_lowpass)

    change = False
    change = show_change('highpassfilter',  highpassfilter) or change
    change = show_change('lowpassfilter',   lowpassfilter)  or change
    if change:
        # update the filter parameters
        b, a, zi = EEGsynth.initialize_online_filter(hdr_input.fSample, highpassfilter, lowpassfilter, filterorder, dat_output, axis=0)

    if not(highpassfilter is None) or not(lowpassfilter is None):
        # apply the filter to the data
        dat_output, zi = EEGsynth.online_filter(b, a, dat_output, axis=0, zi=zi)
        if debug>1:
            print("filtered    ", window, "samples in", (time.time()-start)*1000, "ms")

    # Downsampling
    if not(downsample is None):
        dat_output = decimate(dat_output, downsample, ftype='iir', axis=0, zero_phase=True)
        window_new = int(window / downsample)
        if debug>1:
            print("downsampled ", window, "samples in", (time.time()-start)*1000, "ms")
    else:
        window_new = window
开发者ID:nicofarr,项目名称:eegsynth,代码行数:33,代码来源:preprocessing.py


注:本文中的EEGsynth.initialize_online_filter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。