def METHOD_NAME(self,data, g, velx, tvals):
    pred = self.pd(g, velx, tvals)
    ddx = np.array([np.gradient(r) for r in pred])
    #imshow(ddx)
    #imshow(data/(pred + .01))
    #imshow((data/(pred + .01) - 1)*(tvals[:, None]*ddx))
    return ((data/(pred + .01) - 1)*ddx).sum(0)