LAL  7.5.0.1-bede9b2
LALCosmologyCalculator.c File Reference

Prototypes

double XLALLuminosityDistance (LALCosmologicalParameters *omega, double z)
 The set of functions in this module implements the standard cosmological distance measures defined a Friedmann-Robertson-Walker-Lemaitre metric. More...
 
double XLALAngularDistance (LALCosmologicalParameters *omega, double z)
 Computes the angular size distance by dividing the comoving transverse distance by 1+z Eq. More...
 
double XLALComovingLOSDistance (LALCosmologicalParameters *omega, double z)
 Computes the comoving line-of-sight distance (usually called the proper distance) by integrating the Hubble parameter. More...
 
double XLALComovingTransverseDistance (LALCosmologicalParameters *omega, double z)
 Computes the comoving transverse distance from the comoving line-of-sight distance (proper distance) and Eq. More...
 
double XLALHubbleDistance (LALCosmologicalParameters *omega)
 Computes the Hubble distance, independent of the redshift. More...
 
double XLALHubbleParameter (double z, void *omega)
 Computes the inverse of the Hubble parameter at redshift z Eq. More...
 
double XLALIntegrateHubbleParameter (LALCosmologicalParameters *omega, double z)
 Computes the integral of inverse of the Hubble parameter at redshift z. More...
 
double XLALUniformComovingVolumeDistribution (LALCosmologicalParameters *omega, double z, double zmax)
 This function computes the value of a uniform probability distribution over the comoving volume. More...
 
double XLALUniformComovingVolumeDensity (double z, void *omega)
 This function computes the value of a uniform probability density distribution over the comoving volume at redshift z. More...
 
double XLALComovingVolume (LALCosmologicalParameters *omega, double z)
 This function computes the comoving volume between 0 and z. More...
 
double XLALComovingVolumeElement (double z, void *omega)
 This function computes the comoving volume element (a 4&pi shell) between redshift z and z+dz. More...
 
double XLALIntegrateComovingVolume (LALCosmologicalParameters *omega, double z)
 Function that integrates the comoving volume element. More...
 
double XLALIntegrateComovingVolumeDensity (LALCosmologicalParameters *omega, double z)
 Function that integrates the uniform in comoving volume density to compute the normalisation factor. More...
 
LALCosmologicalParametersXLALCreateCosmologicalParameters (double h, double om, double ol, double w0, double w1, double w2)
 Creates a LALCosmologicalParameters structure from the values of the cosmological parameters. More...
 
void XLALDestroyCosmologicalParameters (LALCosmologicalParameters *omega)
 Destroys a LALCosmologicalParameters structure. More...
 
double XLALGetHubbleConstant (LALCosmologicalParameters *omega)
 The next set of functions return specific parameters from the LALCosmologicalParameters structure. More...
 
double XLALGetOmegaMatter (LALCosmologicalParameters *omega)
 
double XLALGetOmegaLambda (LALCosmologicalParameters *omega)
 
double XLALGetOmegaK (LALCosmologicalParameters *omega)
 
double XLALGetW0 (LALCosmologicalParameters *omega)
 
double XLALGetW1 (LALCosmologicalParameters *omega)
 
double XLALGetW2 (LALCosmologicalParameters *omega)
 
void XLALSetCosmologicalParametersDefaultValue (LALCosmologicalParameters *omega)
 Function to set a LALCosmologicalParameters structure to the default LambdaCDM value (see http://arxiv.org/abs/1303.5076 ) More...
 
LALCosmologicalRateParametersXLALCreateCosmologicalRateParameters (double r0, double W, double Q, double R)
 Function to create a LALCosmologicalRateParameters structure. More...
 
void XLALDestroyCosmologicalRateParameters (LALCosmologicalRateParameters *rate)
 Destroys a LALCosmologicalParameters structure. More...
 
double XLALGetLocalRate (LALCosmologicalRateParameters *rate)
 Returns the local rate. More...
 
double XLALStarFormationDensity (double z, void *params)
 Implements the fit to the SFR in Eq.7 of Coward, Burman 2005 ( http://arxiv.org/abs/astro-ph/0505181 ) See also Porciani & Madau ( http://arxiv.org/pdf/astro-ph/0008294v2.pdf ) and references therein. More...
 
double XLALRateWeightedUniformComovingVolumeDensity (double z, void *params)
 Returns the Rate weighted uniform comoving volume density. More...
 
double XLALIntegrateRateWeightedComovingVolumeDensity (LALCosmologicalParametersAndRate *p, double z)
 Function that integrates the uniform in comoving volume density to compute the normalisation factor. More...
 
double XLALRateWeightedComovingVolumeDistribution (LALCosmologicalParametersAndRate *p, double z, double zmax)
 Returns the source redshifts distribution function obtained by normalizing the differential rate dR/dz integrated throughout the cosmos, as seen in our frame. More...
 
LALCosmologicalParametersAndRateXLALCreateCosmologicalParametersAndRate (void)
 Creates a cosmological parameters and rate structure. More...
 
void XLALDestroyCosmologicalParametersAndRate (LALCosmologicalParametersAndRate *p)
 Destroys a cosmological parameters and rate structure. More...
 
void XLALSetCosmologicalRateParametersDefaultValue (LALCosmologicalRateParameters *params)
 Function to set a LALCosmologicalRateParameters structure to the default independent of z value. More...
 

Go to the source code of this file.

Function Documentation

◆ XLALLuminosityDistance()

double XLALLuminosityDistance ( LALCosmologicalParameters omega,
double  z 
)

The set of functions in this module implements the standard cosmological distance measures defined a Friedmann-Robertson-Walker-Lemaitre metric.

For a detailed reference to the various formulae, see Hogg 1999 ( http://arxiv.org/abs/astro-ph/9905116 ). Computes the luminosity distance as the angular distance divided by (1+z)^2 Eq. 21 in Hogg 1999 ( http://arxiv.org/abs/astro-ph/9905116 )

Definition at line 32 of file LALCosmologyCalculator.c.

◆ XLALAngularDistance()

double XLALAngularDistance ( LALCosmologicalParameters omega,
double  z 
)

Computes the angular size distance by dividing the comoving transverse distance by 1+z Eq.

18 in Hogg 1999 ( http://arxiv.org/abs/astro-ph/9905116 )

Definition at line 45 of file LALCosmologyCalculator.c.

◆ XLALComovingLOSDistance()

double XLALComovingLOSDistance ( LALCosmologicalParameters omega,
double  z 
)

Computes the comoving line-of-sight distance (usually called the proper distance) by integrating the Hubble parameter.

Eq. 15 in Hogg 1999 ( http://arxiv.org/abs/astro-ph/9905116 ).

Definition at line 58 of file LALCosmologyCalculator.c.

◆ XLALComovingTransverseDistance()

double XLALComovingTransverseDistance ( LALCosmologicalParameters omega,
double  z 
)

Computes the comoving transverse distance from the comoving line-of-sight distance (proper distance) and Eq.

16 in Hogg 1999 ( http://arxiv.org/abs/astro-ph/9905116 )

Definition at line 69 of file LALCosmologyCalculator.c.

◆ XLALHubbleDistance()

double XLALHubbleDistance ( LALCosmologicalParameters omega)

Computes the Hubble distance, independent of the redshift.

This is the distance with sets the units for all others. It returns the distance in Mpc. Eq. 4 in Hogg 1999 ( http://arxiv.org/abs/astro-ph/9905116 )

Definition at line 102 of file LALCosmologyCalculator.c.

◆ XLALHubbleParameter()

double XLALHubbleParameter ( double  z,
void *  omega 
)

Computes the inverse of the Hubble parameter at redshift z Eq.

14 in Hogg 1999 ( http://arxiv.org/abs/astro-ph/9905116 )

Definition at line 115 of file LALCosmologyCalculator.c.

◆ XLALIntegrateHubbleParameter()

double XLALIntegrateHubbleParameter ( LALCosmologicalParameters omega,
double  z 
)

Computes the integral of inverse of the Hubble parameter at redshift z.

The integral is computed using the built-in function gsl_integration_qag of the gsl library. The integral is performed using a Gauss-Kronrod adaptive method (see http://www.gnu.org/software/gsl/manual/html_node/QAG-adaptive-integration.html )

Definition at line 137 of file LALCosmologyCalculator.c.

◆ XLALUniformComovingVolumeDistribution()

double XLALUniformComovingVolumeDistribution ( LALCosmologicalParameters omega,
double  z,
double  zmax 
)

This function computes the value of a uniform probability distribution over the comoving volume.

Details of the derivation of these formulae can be found in Coward, Burman 2005 ( http://arxiv.org/abs/astro-ph/0505181 )

Definition at line 164 of file LALCosmologyCalculator.c.

◆ XLALUniformComovingVolumeDensity()

double XLALUniformComovingVolumeDensity ( double  z,
void *  omega 
)

This function computes the value of a uniform probability density distribution over the comoving volume at redshift z.

Definition at line 178 of file LALCosmologyCalculator.c.

◆ XLALComovingVolume()

double XLALComovingVolume ( LALCosmologicalParameters omega,
double  z 
)

This function computes the comoving volume between 0 and z.

Definition at line 192 of file LALCosmologyCalculator.c.

◆ XLALComovingVolumeElement()

double XLALComovingVolumeElement ( double  z,
void *  omega 
)

This function computes the comoving volume element (a 4&pi shell) between redshift z and z+dz.

Definition at line 204 of file LALCosmologyCalculator.c.

◆ XLALIntegrateComovingVolume()

double XLALIntegrateComovingVolume ( LALCosmologicalParameters omega,
double  z 
)

Function that integrates the comoving volume element.

The integration is performed using gsl_integration_qagiu from the gsl library (see http://www.gnu.org/software/gsl/manual/html_node/QAGI-adaptive-integration-on-infinite-intervals.html )

Definition at line 221 of file LALCosmologyCalculator.c.

◆ XLALIntegrateComovingVolumeDensity()

double XLALIntegrateComovingVolumeDensity ( LALCosmologicalParameters omega,
double  z 
)

Function that integrates the uniform in comoving volume density to compute the normalisation factor.

Consistently with Coward, Burman 2005 ( http://arxiv.org/abs/astro-ph/0505181 ) the integral should be always performed up to infinity. However, if the user specifies a value for zmax, the probability density will be normalised by integrating up to that value. To let the upper limit of integration go to infinity, specify zmax < 0. The integration is performed using gsl_integration_qagiu from the gsl library (see http://www.gnu.org/software/gsl/manual/html_node/QAGI-adaptive-integration-on-infinite-intervals.html )

Definition at line 256 of file LALCosmologyCalculator.c.

◆ XLALCreateCosmologicalParameters()

LALCosmologicalParameters* XLALCreateCosmologicalParameters ( double  h,
double  om,
double  ol,
double  w0,
double  w1,
double  w2 
)

Creates a LALCosmologicalParameters structure from the values of the cosmological parameters.

Note that the boundary condition \(\Omega_m + \Omega_k + \Omega_\Lambda = 1\) is imposed here.

Definition at line 286 of file LALCosmologyCalculator.c.

◆ XLALDestroyCosmologicalParameters()

void XLALDestroyCosmologicalParameters ( LALCosmologicalParameters omega)

Destroys a LALCosmologicalParameters structure.

Definition at line 302 of file LALCosmologyCalculator.c.

◆ XLALGetHubbleConstant()

double XLALGetHubbleConstant ( LALCosmologicalParameters omega)

The next set of functions return specific parameters from the LALCosmologicalParameters structure.

Definition at line 310 of file LALCosmologyCalculator.c.

◆ XLALGetOmegaMatter()

double XLALGetOmegaMatter ( LALCosmologicalParameters omega)

Definition at line 314 of file LALCosmologyCalculator.c.

◆ XLALGetOmegaLambda()

double XLALGetOmegaLambda ( LALCosmologicalParameters omega)

Definition at line 318 of file LALCosmologyCalculator.c.

◆ XLALGetOmegaK()

double XLALGetOmegaK ( LALCosmologicalParameters omega)

Definition at line 322 of file LALCosmologyCalculator.c.

◆ XLALGetW0()

double XLALGetW0 ( LALCosmologicalParameters omega)

Definition at line 326 of file LALCosmologyCalculator.c.

◆ XLALGetW1()

double XLALGetW1 ( LALCosmologicalParameters omega)

Definition at line 330 of file LALCosmologyCalculator.c.

◆ XLALGetW2()

double XLALGetW2 ( LALCosmologicalParameters omega)

Definition at line 334 of file LALCosmologyCalculator.c.

◆ XLALSetCosmologicalParametersDefaultValue()

void XLALSetCosmologicalParametersDefaultValue ( LALCosmologicalParameters omega)

Function to set a LALCosmologicalParameters structure to the default LambdaCDM value (see http://arxiv.org/abs/1303.5076 )

Definition at line 341 of file LALCosmologyCalculator.c.

◆ XLALCreateCosmologicalRateParameters()

LALCosmologicalRateParameters* XLALCreateCosmologicalRateParameters ( double  r0,
double  W,
double  Q,
double  R 
)

Function to create a LALCosmologicalRateParameters structure.

Definition at line 354 of file LALCosmologyCalculator.c.

◆ XLALDestroyCosmologicalRateParameters()

void XLALDestroyCosmologicalRateParameters ( LALCosmologicalRateParameters rate)

Destroys a LALCosmologicalParameters structure.

Definition at line 367 of file LALCosmologyCalculator.c.

◆ XLALGetLocalRate()

double XLALGetLocalRate ( LALCosmologicalRateParameters rate)

Returns the local rate.

Definition at line 374 of file LALCosmologyCalculator.c.

◆ XLALStarFormationDensity()

double XLALStarFormationDensity ( double  z,
void *  params 
)

Implements the fit to the SFR in Eq.7 of Coward, Burman 2005 ( http://arxiv.org/abs/astro-ph/0505181 ) See also Porciani & Madau ( http://arxiv.org/pdf/astro-ph/0008294v2.pdf ) and references therein.

Definition at line 382 of file LALCosmologyCalculator.c.

◆ XLALRateWeightedUniformComovingVolumeDensity()

double XLALRateWeightedUniformComovingVolumeDensity ( double  z,
void *  params 
)

Returns the Rate weighted uniform comoving volume density.

Definition at line 393 of file LALCosmologyCalculator.c.

◆ XLALIntegrateRateWeightedComovingVolumeDensity()

double XLALIntegrateRateWeightedComovingVolumeDensity ( LALCosmologicalParametersAndRate p,
double  z 
)

Function that integrates the uniform in comoving volume density to compute the normalisation factor.

Consistently with Coward, Burman 2005 ( http://arxiv.org/abs/astro-ph/0505181 ) the integral should be always performed up to infinity. However, if the user specifies a value for zmax, the probability density will be normalised by integrating up to that value. To let the upper limit of integration go to infinity, specify zmax < 0. The integration is performed using gsl_integration_qagiu from the gsl library (see http://www.gnu.org/software/gsl/manual/html_node/QAGI-adaptive-integration-on-infinite-intervals.html )

Definition at line 409 of file LALCosmologyCalculator.c.

◆ XLALRateWeightedComovingVolumeDistribution()

double XLALRateWeightedComovingVolumeDistribution ( LALCosmologicalParametersAndRate p,
double  z,
double  zmax 
)

Returns the source redshifts distribution function obtained by normalizing the differential rate dR/dz integrated throughout the cosmos, as seen in our frame.

It gives the probability density distribution function of an event occurring in the redshift range 0 to z, see Eq.12 in Coward & Burman ( http://arxiv.org/pdf/astro-ph/0505181v1.pdf )

Definition at line 439 of file LALCosmologyCalculator.c.

◆ XLALCreateCosmologicalParametersAndRate()

LALCosmologicalParametersAndRate* XLALCreateCosmologicalParametersAndRate ( void  )

Creates a cosmological parameters and rate structure.

Definition at line 448 of file LALCosmologyCalculator.c.

◆ XLALDestroyCosmologicalParametersAndRate()

void XLALDestroyCosmologicalParametersAndRate ( LALCosmologicalParametersAndRate p)

Destroys a cosmological parameters and rate structure.

Definition at line 458 of file LALCosmologyCalculator.c.

◆ XLALSetCosmologicalRateParametersDefaultValue()

void XLALSetCosmologicalRateParametersDefaultValue ( LALCosmologicalRateParameters params)

Function to set a LALCosmologicalRateParameters structure to the default independent of z value.

Definition at line 467 of file LALCosmologyCalculator.c.