37namespace PhysicsUtils {
44 double square = (1. + z) * (1. + z);
45 double cube = square * (1. + z);
50 double relative_precision)
const {
73 return dHOverSqrtOmegaK *
std::sinh(comoving / dHOverSqrtOmegaK);
75 return dHOverSqrtOmegaK *
std::sin(comoving / dHOverSqrtOmegaK);
96 return D_M * D_M / (E * D_H * D_H);
Adapt a std::function<double(double)> to the Function Interface.
static const int minimal_order
double hubbleParameter(double z, const CosmologicalParameters ¶meters) const
Returns the (unit-less) Hubble parameter E(z)
double hubbleDistance(const CosmologicalParameters ¶meters) const
Get the computed Hubble distance for the cosmology.
double transverseComovingDistance(double z, const CosmologicalParameters ¶meters) const
return the transverse comoving distance in [pc]
double comovingDistance(double z, const CosmologicalParameters ¶meters, double relative_precision=0.0000001) const
return the comoving distance in [pc]. This value is obtained through a numerical integration....
double distanceModulus(double z, const CosmologicalParameters ¶meters) const
return the correction for the Magnitude due to the distance: DM =5*log_10(DL/10pc)
double luminousDistance(double z, const CosmologicalParameters ¶meters) const
return the luminous distance in [pc]. For z=0 the returned value is 10pc.
double dimensionlessComovingVolumeElement(double z, const CosmologicalParameters ¶meters) const
return the dimensionless comoving volume element.
Model the cosmological parameters. Omega_m, Omega_lambda, Omega_k and hubble_constant....
double getOmegaLambda() const
Get Omega Lambda for the cosmology.
double getHubbleConstant() const
Get the Hubble constant H_0 in (km/s)/Mpc.
double getOmegaM() const
Get Omega matter for the cosmology.
double getOmegaK() const
Get the Omega curvature (computed as 1 - Omega_m - Omega_L) for the cosmology.
std::array< std::vector< double >, N > Coordinates
Used to pass the grid coordinates to interpn. Internally will make a copy of the required values.