Class cosmo
Defined in File cosmology.h
Class Documentation
-
class cosmo
Very simple flat LCDM-type cosmology class.
LePHARE needs to define a fiducial cosmology class in order to compute distance moduli, absolute magnitudes, etc… This small class provides the necessary computations.
Public Functions
-
inline cosmo(double h0 = 70, double om0 = 0.3, double l0 = 0.7)
define a cosmology based on the triplet \(H_0\), \(\Omega_m\), and \(\Omega_\Lambda\)
- Parameters:
h0 – Hubble constant
om0 – matter density at present time
l0 – cosmological constant
-
double distMet(double z) const
compute the metric distance to z in Mpc, as
\[ d_M(z) = \frac{c}{H_0}\int_0^z \frac{dz}{\sqrt{\Omega_m(1+z)^3 + (1-\Omega_m-\Omega_\Lambda)(1+z)^2+\Omega_\Lambda}} \quad .\]The luminosity distance of an object at redshift \(z\) is then defined as \( d_L(z)=(1+z)\,d_M(z)\).
-
double distMod(double z) const
compute the distance modulus at z, as
\[ \mu(z) = 5\log_{10}d_L(z) + 25 \quad. \]
-
double time(double z) const
compute the cosmological time from infinity to z
-
double flux_rescaling(double z, double z_t) const
Return the scaling factor that brings a flux from one value to another, based only on a change of redshift.
\param z Current redshift \param z_t Target redshift \return flux scale factor corresponding to a distance change from \f$z\f$ to \f$z_t\f$ : \f[ scale = 10^{0.4\large(\mu(z_t)-\mu(z)\large)}\f]where \(\mu\) is the distance modulus for a given redshift and is obtained calling the function cosmo::distMod.
-
inline cosmo(double h0 = 70, double om0 = 0.3, double l0 = 0.7)