'**SUMMARY**
Detren the data
**PARAMETERS**
**RETURNS**
A LineScan object with detrened data.
**EXAMPLE**
>>> ls = img.getLineScan(x=10)
>>> dt = ls.detrend()
>>> plt.plot(ls)
>>> plt.plot(dt)'

def detrend(self):

    try:
        from scipy.signal import detrend as sdetrend
    except ImportError:
        warnings.warn('Scipy    vesion    >=    0.11    requierd.')
        return None
    detrend_arr = sdetrend(np.asarray(self[:]))
    retVal = LineScan(detrend_arr.astype('uint8').tolist(), image=self.image, pointLoc=self.pointLoc, pt1=self.pt1, pt2=self.pt2, x=self.col, y=self.row)
    retVal._update(self)
    return retVal
