weakutil.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:weakmon 作者: rtmrtmrtmrtm 项目源码 文件源码
def __init__(self, from_rate, to_rate):
        self.from_rate = from_rate
        self.to_rate = to_rate

        if self.from_rate > self.to_rate:
            # prepare a filter to precede resampling.
            self.filter = butter_lowpass(0.45 * self.to_rate,
                                         from_rate,
                                         7)
            self.zi = scipy.signal.lfiltic(self.filter[0],
                                           self.filter[1],
                                           [0])

        # total number of input and output samples,
        # so we can insert/delete to keep long-term
        # rates correct.
        self.nin = 0
        self.nout = 0

    # how much will output be delayed?
    # in units of output samples.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号