def __get_beta(beta, eta):
    """
    Get and check the beta argument. The argument can be None (which then uses 0.4/eta) or a single
    value. The value must be positive and less than 1/eta.
    """
    if beta is None: return 0.4/eta
    if beta <= 0 or beta >= 1/eta: raise ValueError('beta')
    return beta