Loading [MathJax]/extensions/TeX/AMSsymbols.js
LAL 7.7.0.1-3a66518
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALCosmologyCalculator.h
Go to the documentation of this file.
1/* Copyright (C) 2012 Walter Del Pozzo, Tjonnie Li
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with with program; see the file COPYING. If not, write to the
15 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16 * MA 02110-1301 USA
17 */
18
19#ifndef LALCOSMOLOGYCALCULATOR_H
20#define LALCOSMOLOGYCALCULATOR_H
21
22#include <lal/LALConstants.h>
23
24/**
25 * @name Default cosmological pararameters
26 *
27 * To use the default cosmology in astropy with SWIG-Python LAL:
28 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.py}
29 * from lal import H0_SI, OMEGA_M
30 * from astropy.cosmology import FlatLambdaCDM
31 * from astropy.units import Hz
32 * cosmo = FlatLambdaCDM(H0=H0_SI*Hz, Om0=OMEGA_M)
33 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34 */
35
36typedef struct tagLALCosmologicalParameters
37{
38 double h; /* normalised hubble constant h = H0/100km/Mpc/s */
39 double om; /* matter energy density */
40 double ol; /* cosmological constant density */
41 double ok; /* curvature */
42 double w0; /* 0th order dark energy equation of state parameter */
43 double w1; /* 1st order dark energy equation of state parameter */
44 double w2; /* 2nd order dark energy equation of state parameter */
46
47typedef struct tagLALCosmologicalRateParameters
48{
49 double r0; /* local coalescence rate in units of Mpc^-3 yr^-1 */
50 double W; /* phenomenological parameter for the analytical fit to the SFR rate */
51 double Q; /* phenomenological parameter for the analytical fit to the SFR rate */
52 double R; /* phenomenological parameter for the analytical fit to the SFR rate */
54
55typedef struct tagLALCosmologicalParametersAndRate
56{
60
63 double z);
64
67 double z);
68
71 double z);
72
75 double z);
76
79 );
80
81double XLALHubbleParameter(double z,
82 void *omega
83 );
84
87 double z);
88
90 double z,
91 void *omega);
92
95 double z);
96
97
99 double z,
100 void *omega);
101
104 double z,
105 double zmax);
106
108
110
111LALCosmologicalParameters *XLALCreateCosmologicalParameters(double h, double om, double ol, double w0, double w1, double w2);
113
115
124
125
126LALCosmologicalRateParameters *XLALCreateCosmologicalRateParameters(double r0, double W, double Q, double R);
129double XLALStarFormationDensity(double z, void *rate);
130
131double XLALRateWeightedUniformComovingVolumeDensity(double z, void *params);
134
138#endif
double XLALGetOmegaLambda(LALCosmologicalParameters *omega)
double XLALComovingVolume(LALCosmologicalParameters *omega, double z)
This function computes the comoving volume between 0 and z.
double XLALGetW2(LALCosmologicalParameters *omega)
LALCosmologicalRateParameters * XLALCreateCosmologicalRateParameters(double r0, double W, double Q, double R)
Function to create a LALCosmologicalRateParameters structure.
double XLALLuminosityDistance(LALCosmologicalParameters *omega, double z)
The set of functions in this module implements the standard cosmological distance measures defined a ...
double XLALGetLocalRate(LALCosmologicalRateParameters *rate)
Returns the local rate.
double XLALGetHubbleConstant(LALCosmologicalParameters *omega)
The next set of functions return specific parameters from the LALCosmologicalParameters structure.
double XLALIntegrateComovingVolume(LALCosmologicalParameters *omega, double z)
Function that integrates the comoving volume element.
double XLALGetOmegaK(LALCosmologicalParameters *omega)
double XLALRateWeightedUniformComovingVolumeDensity(double z, void *params)
Returns the Rate weighted uniform comoving volume density.
double XLALIntegrateComovingVolumeDensity(LALCosmologicalParameters *omega, double z)
Function that integrates the uniform in comoving volume density to compute the normalisation factor.
double XLALComovingTransverseDistance(LALCosmologicalParameters *omega, double z)
Computes the comoving transverse distance from the comoving line-of-sight distance (proper distance) ...
double XLALHubbleParameter(double z, void *omega)
Computes the inverse of the Hubble parameter at redshift z Eq.
double XLALUniformComovingVolumeDistribution(LALCosmologicalParameters *omega, double z, double zmax)
This function computes the value of a uniform probability distribution over the comoving volume.
LALCosmologicalParameters * XLALCreateDefaultCosmologicalParameters(void)
LALCosmologicalParametersAndRate * XLALCreateCosmologicalParametersAndRate(void)
Creates a cosmological parameters and rate structure.
double XLALGetOmegaMatter(LALCosmologicalParameters *omega)
double XLALComovingVolumeElement(double z, void *omega)
This function computes the comoving volume element (a 4&pi shell) between redshift z and z+dz.
double XLALIntegrateHubbleParameter(LALCosmologicalParameters *omega, double z)
Computes the integral of inverse of the Hubble parameter at redshift z.
double XLALRateWeightedComovingVolumeDistribution(LALCosmologicalParametersAndRate *p, double z, double zmax)
Returns the source redshifts distribution function obtained by normalizing the differential rate dR/d...
double XLALGetW0(LALCosmologicalParameters *omega)
void XLALDestroyCosmologicalParametersAndRate(LALCosmologicalParametersAndRate *p)
Destroys a cosmological parameters and rate structure.
double XLALComovingLOSDistance(LALCosmologicalParameters *omega, double z)
Computes the comoving line-of-sight distance (usually called the proper distance) by integrating the ...
double XLALAngularDistance(LALCosmologicalParameters *omega, double z)
Computes the angular size distance by dividing the comoving transverse distance by 1+z Eq.
void XLALDestroyCosmologicalParameters(LALCosmologicalParameters *omega)
Destroys a LALCosmologicalParameters structure.
double XLALUniformComovingVolumeDensity(double z, void *omega)
This function computes the value of a uniform probability density distribution over the comoving volu...
double XLALGetW1(LALCosmologicalParameters *omega)
double XLALHubbleDistance(LALCosmologicalParameters *omega)
Computes the Hubble distance, independent of the redshift.
void XLALSetCosmologicalParametersDefaultValue(LALCosmologicalParameters *omega)
Function to set a LALCosmologicalParameters structure to the default FlatLambdaCDM.
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.
void XLALSetCosmologicalRateParametersDefaultValue(LALCosmologicalRateParameters *params)
Function to set a LALCosmologicalRateParameters structure to the default independent of z value.
void XLALDestroyCosmologicalRateParameters(LALCosmologicalRateParameters *rate)
Destroys a LALCosmologicalParameters structure.
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 ...
double XLALIntegrateRateWeightedComovingVolumeDensity(LALCosmologicalParametersAndRate *p, double z)
Function that integrates the uniform in comoving volume density to compute the normalisation factor.
static double Q(double mu, double x)
Definition: XLALMarcumQ.c:99
LALCosmologicalRateParameters * rate
LALCosmologicalParameters * omega