import math


def Lorentzian(x, i, x0, gamma):
    """ Return L(x) = (i / pi) * ((0.5 * gamma) / ((x - x_0) ** 2) + (0.5 * gamma) ** 2). """

    # Definition of the Lorentzian function with unit area taken from http://mathworld.wolfram.com/LorentzianFunction.html.

    return (i / math.pi) * ((0.5 * gamma) / ((x - x0) ** 2 + (0.5 * gamma) ** 2));