コード例 #1
0
def d_comov(z, Omega_M, Omega_L):

    check_cosmo(z, Omega_M, Omega_L)

    if isinstance(z, (list, tuple, np.ndarray)):
        return vinteg_2arg(E_inv, 0, z, Omega_M, Omega_L)

    else:
        return integ_2arg(E_inv, 0, z, Omega_M, Omega_L)
コード例 #2
0
def age(H_0, z, Omega_M, Omega_L):

    check_cosmo(z, Omega_M, Omega_L)

    def func(z, Omega_M, Omega_L):
        A = 1.0 + z
        B = (1.0 + z) ** 2 * (1.0 + Omega_M * z)
        C = z * (2.0 + z) * Omega_L
        return 1.0 / (A * np.sqrt(B - C))

    return integ_2arg(func, z, np.inf, Omega_M, Omega_L) * t_H(H_0)