def hill_func(x, a, b, c, d):  # Hill function
    """Calculates the Hill function at x.

        a : sigmoid low level
        b : sigmoid high level
        c : approximate inflection point
        d : slope of the sigmoid
    """
    return a + (b - a) / (1.0 + (c / x) ** d)