CCL: /home/chisarie/Documents/lsst_ccl/CCL/include/ccl_background.h File Reference

CCL

Typedefs | Enumerations | Functions
ccl_background.h File Reference
`#include "ccl_core.h"`

Go to the source code of this file.

## Typedefs
typedef enum ccl_omega_x_label | ccl_omega_x_label

## Enumerations
enum | ccl_omega_x_label { ccl_omega_m_label =0, ccl_omega_l_label =1, ccl_omega_g_label =2, ccl_omega_k_label =3, ccl_omega_ur_label =4, ccl_omega_nu_label =5 }

## Functions
double | ccl_h_over_h0 (ccl_cosmology *cosmo, double a, int *status)
void | ccl_h_over_h0s (ccl_cosmology *cosmo, int na, double a[na], double output[na], int *status)
double | ccl_comoving_radial_distance (ccl_cosmology *cosmo, double a, int *status)
void | ccl_comoving_radial_distances (ccl_cosmology *cosmo, int na, double a[na], double output[na], int *status)
double | ccl_sinn (ccl_cosmology *cosmo, double chi, int *status)
double | ccl_comoving_angular_distance (ccl_cosmology *cosmo, double a, int *status)
void | ccl_comoving_angular_distances (ccl_cosmology *cosmo, int na, double a[na], double output[na], int *status)
double | ccl_luminosity_distance (ccl_cosmology *cosmo, double a, int *status)
void | ccl_luminosity_distances (ccl_cosmology *cosmo, int na, double a[na], double output[na], int *status)
double | ccl_distance_modulus (ccl_cosmology *cosmo, double a, int *status)
void | ccl_distance_moduli (ccl_cosmology *cosmo, int na, double a[na], double output[na], int *status)
double | ccl_growth_factor (ccl_cosmology *cosmo, double a, int *status)
void | ccl_growth_factors (ccl_cosmology *cosmo, int na, double a[na], double output[na], int *status)
double | ccl_growth_factor_unnorm (ccl_cosmology *cosmo, double a, int *status)
void | ccl_growth_factors_unnorm (ccl_cosmology *cosmo, int na, double a[na], double output[na], int *status)
double | ccl_growth_rate (ccl_cosmology *cosmo, double a, int *status)
void | ccl_growth_rates (ccl_cosmology *cosmo, int na, double a[na], double output[na], int *status)
double | ccl_scale_factor_of_chi (ccl_cosmology *cosmo, double chi, int *status)
void | ccl_scale_factor_of_chis (ccl_cosmology *cosmo, int nchi, double chi[nchi], double output[nchi], int *status)
double | ccl_omega_x (ccl_cosmology *cosmo, double a, ccl_omega_x_label label, int *status)

## Typedef Documentation

## ◆ ccl_omega_x_label

typedef enum ccl_omega_x_label ccl_omega_x_label

## Enumeration Type Documentation

## ◆ ccl_omega_x_label

enum ccl_omega_x_label

Enumerator
ccl_omega_m_label |
ccl_omega_l_label |
ccl_omega_g_label |
ccl_omega_k_label |
ccl_omega_ur_label |
ccl_omega_nu_label |

## Function Documentation

## ◆ ccl_comoving_angular_distance()

double ccl_comoving_angular_distance | ( | ccl_cosmology * | cosmo,
|  | double | a,
|  | int * | status
| ) |  |

Comoving angular distance in Mpc from today to scale factor a NOTE this quantity is otherwise known as the transverse comoving distance, and is NOT angular diameter distance or angular separation

Parameters

  cosmo | Cosmological parameters
  a | scale factor, normalized to 1 for today
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c

Returns
  comoving_angular_distance, the angular distance in Mpc

## ◆ ccl_comoving_angular_distances()

void ccl_comoving_angular_distances | ( | ccl_cosmology * | cosmo,
|  | int | na,
|  | double | a[na],
|  | double | output[na],
|  | int * | status
| ) |  |

Comoving angular distances in Mpc to scale factors as given in array a[0..na-1] NOTE this quantity is otherwise known as the transverse comoving distance, and is NOT angular diameter distance or angular separation

Parameters

  cosmo | Cosmological parameters
  na | Number of scale factors in a
  a | array of scale factors
  output | array of length na to store the results of the calculation. The entry at index i stores the distance for a[i].
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  void

## ◆ ccl_comoving_radial_distance()

double ccl_comoving_radial_distance | ( | ccl_cosmology * | cosmo,
|  | double | a,
|  | int * | status
| ) |  |

Comoving radial distance in Mpc from today to scale factor a

Parameters

  cosmo | Cosmological parameters
  a | scale factor, normalized to 1 for today
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c

Returns
  comoving_radial_distance, Comoving radial distance in Mpc

## ◆ ccl_comoving_radial_distances()

void ccl_comoving_radial_distances | ( | ccl_cosmology * | cosmo,
|  | int | na,
|  | double | a[na],
|  | double | output[na],
|  | int * | status
| ) |  |

Comoving radial distances in Mpc to scale factors as given in list a[0..na-1]

Parameters

  cosmo | Cosmological parameters
  na | Number of scale factors in a
  a | array of scale factors
  output | array of length na to store the results of the calculation. The entry at index i stores the distance for a[i].
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  void

## ◆ ccl_distance_moduli()

void ccl_distance_moduli | ( | ccl_cosmology * | cosmo,
|  | int | na,
|  | double | a[na],
|  | double | output[na],
|  | int * | status
| ) |  |

Distance moduli for objects at scale factors as given in list a[0..na-1]. Note the factor of 6 arises from the conversion from Mpc to pc.

Parameters

  cosmo | Cosmological parameters
  na | Number of scale factors in a
  a | array of scale factors
  output | array of length na to store the results of the calculation. The entry at index i stores the distance for a[i].
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  void

## ◆ ccl_distance_modulus()

double ccl_distance_modulus | ( | ccl_cosmology * | cosmo,
|  | double | a,
|  | int * | status
| ) |  |

Distance modulus for object at scale factor a. Note the factor of 6 arises from the conversion from Mpc to pc.

Parameters

  cosmo | Cosmological parameters
  a | scale factor, normalized to 1 today
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  distance modulus

## ◆ ccl_growth_factor()

double ccl_growth_factor | ( | ccl_cosmology * | cosmo,
|  | double | a,
|  | int * | status
| ) |  |

Growth factor at scale factor a, where g(z=0) is normalized to 1

Parameters

  cosmo | Cosmological parameters
  a | scale factor, normalized to 1 for today
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c

Returns
  growth_factor, growth factor at a

## ◆ ccl_growth_factor_unnorm()

double ccl_growth_factor_unnorm | ( | ccl_cosmology * | cosmo,
|  | double | a,
|  | int * | status
| ) |  |

Growth factor at scale factor a, where g(a) is normalized to a in matter domination

Parameters

  cosmo | Cosmological parameters
  a | scale factor, normalized to 1 for today
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c

Returns
  growth_factor_unnorm, Unnormalized growth factor, normalized to the scale factor at early times.

## ◆ ccl_growth_factors()

void ccl_growth_factors | ( | ccl_cosmology * | cosmo,
|  | int | na,
|  | double | a[na],
|  | double | output[na],
|  | int * | status
| ) |  |

Growth factors at an array of scale factor given in a[0..na-1], where g(z=0) is normalized to 1

Parameters

  cosmo | Cosmological parameters
  na | Number of scale factors in a
  a | array of scale factors
  output | array of length na to store the results of the calculation. The entry at index i stores the distance for a[i].
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  void

## ◆ ccl_growth_factors_unnorm()

void ccl_growth_factors_unnorm | ( | ccl_cosmology * | cosmo,
|  | int | na,
|  | double | a[na],
|  | double | output[na],
|  | int * | status
| ) |  |

Growth factors at a list of scale factor given in a[0..na-1], where g(a) is normalized to a in matter domination

Parameters

  cosmo | Cosmological parameters
  na | Number of scale factors in a
  a | array of scale factors
  output | array of length na to store the results of the calculation. The entry at index i stores the distance for a[i].
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  void

## ◆ ccl_growth_rate()

double ccl_growth_rate | ( | ccl_cosmology * | cosmo,
|  | double | a,
|  | int * | status
| ) |  |

Logarithmic rate of d ln(g)/d ln(a) at scale factor a

Parameters

  cosmo | Cosmological parameters
  a | scale factor, normalized to 1 for today
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c

Returns
  f, the growth rate at a

## ◆ ccl_growth_rates()

void ccl_growth_rates | ( | ccl_cosmology * | cosmo,
|  | int | na,
|  | double | a[na],
|  | double | output[na],
|  | int * | status
| ) |  |

Logarithmic rates of d ln(g)/d ln(a) at an array of scale factors a[0..na-1]

Parameters

  cosmo | Cosmological parameters
  na | Number of scale factors in a
  a | array of scale factors
  output | array of length na to store the results of the calculation. The entry at index i stores the distance for a[i].
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  void

## ◆ ccl_h_over_h0()

double ccl_h_over_h0 | ( | ccl_cosmology * | cosmo,
|  | double | a,
|  | int * | status
| ) |  |

Normalized expansion rate at scale factor a. Returns H(a)/H0 in a given cosmology.

Parameters

  cosmo | Cosmological parameters
  a | scale factor, normalized to 1 for today
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c

Returns
  h_over_h0, the value of H(a)/H0.

## ◆ ccl_h_over_h0s()

void ccl_h_over_h0s | ( | ccl_cosmology * | cosmo,
|  | int | na,
|  | double | a[na],
|  | double | output[na],
|  | int * | status
| ) |  |

Normalized expansion rate at scale factors as given in list a[0..na-1] Returns H(a)/H0 for an array of scale factors a of length na.

Parameters

  cosmo | Cosmological parameters
  na | Number of scale factors in a
  a | array of scale factors
  output | array of length na to store the results of the calculation. The entry at index i stores H(a[i])/H0
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  void

## ◆ ccl_luminosity_distance()

double ccl_luminosity_distance | ( | ccl_cosmology * | cosmo,
|  | double | a,
|  | int * | status
| ) |  |

Comoving luminosity distance in Mpc from today to scale factor a

Parameters

  cosmo | Cosmological parameters
  a | scale factor, normalized to 1 for today
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c

Returns
  luminosity_distance, the angular distance in Mpc

## ◆ ccl_luminosity_distances()

void ccl_luminosity_distances | ( | ccl_cosmology * | cosmo,
|  | int | na,
|  | double | a[na],
|  | double | output[na],
|  | int * | status
| ) |  |

Comoving luminosity distances in Mpc to scale factors as given in array a[0..na-1]

Parameters

  cosmo | Cosmological parameters
  na | Number of scale factors in a
  a | array of scale factors
  output | array of length na to store the results of the calculation. The entry at index i stores the distance for a[i].
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  void

## ◆ ccl_omega_x()

double ccl_omega_x | ( | ccl_cosmology * | cosmo,
|  | double | a,
|  | ccl_omega_x_label | label,
|  | int * | status
| ) |  |

Density fraction of a given species at a redshift different than z=0.

Parameters

  cosmo | Cosmological parameters
  a | scale factor, normalized to 1 for today
  label | species type. Available: 'matter' (0), 'dark_energy'(1), 'radiation'(2), and 'curvature'(3)
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  omega_x, Density fraction of a given species at scale factor a.

## ◆ ccl_scale_factor_of_chi()

double ccl_scale_factor_of_chi | ( | ccl_cosmology * | cosmo,
|  | double | chi,
|  | int * | status
| ) |  |

Scale factor for a given comoving distance (in Mpc)

Parameters

  cosmo | Cosmological parameters
  chi | Comoving distance in Mpc
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  a, scale factor of distance xi

## ◆ ccl_scale_factor_of_chis()

void ccl_scale_factor_of_chis | ( | ccl_cosmology * | cosmo,
|  | int | nchi,
|  | double | chi[nchi],
|  | double | output[nchi],
|  | int * | status
| ) |  |

Scale factors for a given array of comoving distances chi[0..nchi-1]

Parameters

  cosmo | Cosmological parameters
  nchi | Number of chis in chi
  chi | array of comoving distances
  output | array of length na to store the results of the calculation. The entry at index i stores the scale factor for chi[i].
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  void

## ◆ ccl_sinn()

double ccl_sinn | ( | ccl_cosmology * | cosmo,
|  | double | chi,
|  | int * | status
| ) |  |

Transforms between radial and transverse comoving distances Calculate the comoving radial distance of two objects with comoving radial distance chi via: { sin(x) , if k==1 sinn(x)={ x , if k==0 { sinh(x) , if k==-1

Parameters

  cosmo | Cosmological parameters
  chi | Comoving radial distance of two objects
  status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.

Returns
  chi_t, the transverse comoving distance