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)))