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)
评论列表
文章目录