strans.py 文件源码

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

项目:cebl 作者: idfah 项目源码 文件源码
def updateTrace(self, event=None):
        if self.collecting:
            # make sure we're not passing through the current strans filter
            self.flt.stransFilter = None
            self.flt.trainCap = self.getCap()

        if self.rawView:
            data = self.flt.trainCap.data
            chanNames = self.flt.trainCap.getChanNames()

        else:
            data = self.flt.filteredTrain
            chanNames = self.flt.getOutChans()

        data = data - data.mean(axis=0)

        #dFactor = int(np.log2(2*data.size/float(256*8*10))) + 1
        dFactor = (data.size // (256*8*10)) + 1
        if dFactor > 1:
            data = sig.decimate(data, factor=dFactor)#, lowpassFrac=0.75, order=4)

        t = self.flt.trainCap.getNSec()

        scale = np.max(2*data.std(axis=0))
        self.tracePlot.draw(data, t=t, chanNames=chanNames, scale=scale)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号