def FitPowerLaw(x, y):
    '\n\tFits the input data in the form\n\t\ty = a*x^b\n\treturns a,b\n\t'
    import scipy.optimize as optimize
    fFit = (lambda p, x: (p[0] * (x ** p[1])))
    fErr = (lambda p, x, y: (y - fFit(p, x)))
    p0 = [max(y), (- 1.0)]
    out = optimize.leastsq(fErr, p0, args=(x, y), full_output=1)
    pOut = out[0]
    b = pOut[1]
    a = pOut[0]
    return (a, b)
Fits the input data in the form
        y = a*x^b
returns a,b
def FitPowerLaw(x, y):
    '\n\tFits the input data in the form\n\t\ty = a*x^b\n\treturns a,b\n\t'
    import scipy.optimize as optimize
    fFit = (lambda p, x: (p[0] * (x ** p[1])))
    fErr = (lambda p, x, y: (y - fFit(p, x)))
    p0 = [max(y), (- 1.0)]
    out = optimize.leastsq(fErr, p0, args=(x, y), full_output=1)
    pOut = out[0]
    b = pOut[1]
    a = pOut[0]
    return (a, b)