cosmo_param(omega_m, omega_lambda, omega_k, q0)
Given any two of the four input parameters -- (1) the normalized matter density omega_m (2) the normalized cosmological constant, omega_lambda (3) the normalized curvature term, Omega_k and (4) the deceleration parameter q0 -- this program will derive the remaining two. Here "normalized" means divided by the closure density so that omega_m + omega_lambda + omega_k = 1. For a more precise definition see Carroll et al (1992).
If fewer than two parameters are defined, this procedure sets default values of omega_k=0 (flat space), omega_lambda = 0.7, omega_m = 0.3 and q0 = -0.55 If more than two parameters are defined upon input (overspecification), then the first two defined parameters in the ordered list omega_m, omega_lambda, omega_k, q0 are used to define the cosmology.
cosmo_param(0.3, NULL, 1.0, NULL) # returns omega_lambda=0.7 and q0=-1.05
Run the code above in your browser using DataLab