def run(ds): pw.plot(data, clear=True) for m, c in zip(methods, colors): d1 = data.copy() t = time.clock() d2 = NiDAQ.downsample(d1, ds, method=m) print "Method %d: %f" % (i, time.clock()-t) p = pw.plot(y=d2, x=linspace(0, len(d2)*ds, len(d2)), pen=mkPen(c)) p.setZValue(10000)
def showDownsample(**kwargs): d1 = data.copy() d2 = NiDAQ.downsample(d1, **kwargs) xv2 = xVals[::kwargs['ds']][:len(d2)] pw.plot(y=d1, x=xVals, clear=True) pw.plot(y=d2[:len(xv2)], x=xv2, pen=mkPen((255, 0, 0)))