37 namespace 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);
double getOmegaK() const
Get the Omega curvature (computed as 1 - Omega_m - Omega_L) for the cosmology.
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. The relative precision of the integration can be specified and is defaulted to 0.00001%.
double getOmegaM() const
Get Omega matter for the cosmology.
double transverseComovingDistance(double z, const CosmologicalParameters ¶meters) const
return the transverse comoving distance in [pc]
double getHubbleConstant() const
Get the Hubble constant H_0 in (km/s)/Mpc.
double hubbleParameter(double z, const CosmologicalParameters ¶meters) const
Returns the (unit-less) Hubble parameter E(z)
Class implementing the NumericalIntegrationScheme interface.
double getOmegaLambda() const
Get Omega Lambda for the cosmology.
Adapt a std::function<double(double)> to the Function Interface.
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.
double hubbleDistance(const CosmologicalParameters ¶meters) const
Get the computed Hubble distance for the cosmology.
ELEMENTS_API double integrate(const Function &function, const double min, const double max, std::unique_ptr< NumericalIntegrationScheme > numericalIntegrationScheme=nullptr)
double distanceModulus(double z, const CosmologicalParameters ¶meters) const
return the correction for the Magnitude due to the distance: DM =5*log_10(DL/10pc) ...
bool isEqual(const RawType &left, const RawType &right)
static const int minimal_order
Model the cosmological parameters. Omega_m, Omega_lambda, Omega_k and hubble_constant. Guarantee that the sum of the Omegas is 1.