Prototypes | |
Default cosmological pararameters | |
To use the default cosmology in astropy with SWIG-Python LAL: from lal import H0_SI, OMEGA_M
from astropy.cosmology import FlatLambdaCDM
from astropy.units import Hz
cosmo = FlatLambdaCDM(H0=H0_SI*Hz, Om0=OMEGA_M)
| |
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 | XLALComovingVolumeElement (double z, void *omega) |
This function computes the comoving volume element (a 4&pi shell) between redshift z and z+dz. More... | |
double | XLALComovingVolume (LALCosmologicalParameters *omega, double z) |
This function computes the comoving volume between 0 and z. 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 | XLALUniformComovingVolumeDistribution (LALCosmologicalParameters *omega, double z, double zmax) |
This function computes the value of a uniform probability distribution over the comoving volume. 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... | |
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. More... | |
LALCosmologicalParameters * | XLALCreateDefaultCosmologicalParameters (void) |
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 FlatLambdaCDM. More... | |
LALCosmologicalRateParameters * | XLALCreateCosmologicalRateParameters (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 *rate) |
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... | |
LALCosmologicalParametersAndRate * | XLALCreateCosmologicalParametersAndRate (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.
Data Structures | |
struct | LALCosmologicalParameters |
struct | LALCosmologicalRateParameters |
struct | LALCosmologicalParametersAndRate |
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 40 of file LALCosmologyCalculator.c.
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 53 of file LALCosmologyCalculator.c.
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 66 of file LALCosmologyCalculator.c.
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 77 of file LALCosmologyCalculator.c.
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 110 of file LALCosmologyCalculator.c.
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 123 of file LALCosmologyCalculator.c.
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 145 of file LALCosmologyCalculator.c.
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 212 of file LALCosmologyCalculator.c.
double XLALComovingVolume | ( | LALCosmologicalParameters * | omega, |
double | z | ||
) |
This function computes the comoving volume between 0 and z.
Definition at line 200 of file LALCosmologyCalculator.c.
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 186 of file LALCosmologyCalculator.c.
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 172 of file LALCosmologyCalculator.c.
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 229 of file LALCosmologyCalculator.c.
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 264 of file LALCosmologyCalculator.c.
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 295 of file LALCosmologyCalculator.c.
LALCosmologicalParameters * XLALCreateDefaultCosmologicalParameters | ( | void | ) |
Definition at line 308 of file LALCosmologyCalculator.c.
void XLALDestroyCosmologicalParameters | ( | LALCosmologicalParameters * | omega | ) |
Destroys a LALCosmologicalParameters structure.
Definition at line 319 of file LALCosmologyCalculator.c.
double XLALGetHubbleConstant | ( | LALCosmologicalParameters * | omega | ) |
The next set of functions return specific parameters from the LALCosmologicalParameters structure.
Definition at line 327 of file LALCosmologyCalculator.c.
double XLALGetOmegaMatter | ( | LALCosmologicalParameters * | omega | ) |
Definition at line 331 of file LALCosmologyCalculator.c.
double XLALGetOmegaLambda | ( | LALCosmologicalParameters * | omega | ) |
Definition at line 335 of file LALCosmologyCalculator.c.
double XLALGetOmegaK | ( | LALCosmologicalParameters * | omega | ) |
Definition at line 339 of file LALCosmologyCalculator.c.
double XLALGetW0 | ( | LALCosmologicalParameters * | omega | ) |
Definition at line 343 of file LALCosmologyCalculator.c.
double XLALGetW1 | ( | LALCosmologicalParameters * | omega | ) |
Definition at line 347 of file LALCosmologyCalculator.c.
double XLALGetW2 | ( | LALCosmologicalParameters * | omega | ) |
Definition at line 351 of file LALCosmologyCalculator.c.
void XLALSetCosmologicalParametersDefaultValue | ( | LALCosmologicalParameters * | omega | ) |
Function to set a LALCosmologicalParameters structure to the default FlatLambdaCDM.
Definition at line 358 of file LALCosmologyCalculator.c.
LALCosmologicalRateParameters * XLALCreateCosmologicalRateParameters | ( | double | r0, |
double | W, | ||
double | Q, | ||
double | R | ||
) |
Function to create a LALCosmologicalRateParameters structure.
Definition at line 372 of file LALCosmologyCalculator.c.
void XLALDestroyCosmologicalRateParameters | ( | LALCosmologicalRateParameters * | rate | ) |
Destroys a LALCosmologicalParameters structure.
Definition at line 385 of file LALCosmologyCalculator.c.
double XLALGetLocalRate | ( | LALCosmologicalRateParameters * | rate | ) |
Returns the local rate.
Definition at line 392 of file LALCosmologyCalculator.c.
double XLALStarFormationDensity | ( | double | z, |
void * | rate | ||
) |
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 400 of file LALCosmologyCalculator.c.
double XLALRateWeightedUniformComovingVolumeDensity | ( | double | z, |
void * | params | ||
) |
Returns the Rate weighted uniform comoving volume density.
Definition at line 411 of file LALCosmologyCalculator.c.
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 427 of file LALCosmologyCalculator.c.
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 457 of file LALCosmologyCalculator.c.
LALCosmologicalParametersAndRate * XLALCreateCosmologicalParametersAndRate | ( | void | ) |
Creates a cosmological parameters and rate structure.
Definition at line 466 of file LALCosmologyCalculator.c.
void XLALDestroyCosmologicalParametersAndRate | ( | LALCosmologicalParametersAndRate * | p | ) |
Destroys a cosmological parameters and rate structure.
Definition at line 476 of file LALCosmologyCalculator.c.
void XLALSetCosmologicalRateParametersDefaultValue | ( | LALCosmologicalRateParameters * | params | ) |
Function to set a LALCosmologicalRateParameters structure to the default independent of z value.
Definition at line 485 of file LALCosmologyCalculator.c.