'**SUMMARY**
This function finds the discrete derivative of the signal.
The discrete derivative is simply the difference between each
succesive samples. A good use of this function is edge detection
**RETURNS**
Returns the discrete derivative function as a LineScan object.
**EXAMPLE**
>>>> import matplotlib.pyplot as plt
>>>> img = Image(\'lenna\')
>>>> sl = img.getLineScan(y=128)
>>>> plt.plot(sl)
>>>> plt.plot(sl.derivative())
>>>> plt.show()'

def derivative(self):

    temp = np.array(self, dtype='float32')
    d = [0]
    d += list((temp[1:] - temp[0:(-1)]))
    retVal = LineScan(d, image=self.image, pointLoc=self.pointLoc, pt1=self.pt1, pt2=self.pt2)
    return retVal
