def lorentzian(x, x0=0.0, gamma=1.0, amp=1.0, offset=0.0, gradient=0.0):
    """
    lorentzian function : (x, x0=0., gamma=1., amp=1., offset=0., gradient=0.)
    gamma = FWHM : Full Width at Half Maximum
    amp is the amplitude at the center
    This function is not normalized to 1
    Area under this Lorentzian is (A * Gamma * pi / 2) with offset and gradient = 0.
    """
    return amp * (gamma / 2) ** 2 / ((x - x0) ** 2 + (gamma / 2) ** 2
        ) + offset + gradient * x
