pyccl.background module

Smooth background quantities

CCL defines seven species types:

  • ‘matter’: cold dark matter and baryons
  • ‘dark_energy’: cosmological constant or otherwise
  • ‘radiation’: relativistic species besides massless neutrinos (i.e., only photons)
  • ‘curvature’: curvature density
  • ‘neutrinos_rel’: relativistic neutrinos
  • ‘neutrinos_massive’: massive neutrinos

These strings define the species inputs to the functions below.

pyccl.background.Sig_MG(cosmo, a)[source]

Redshift-dependent modification to Poisson equation for massless particles under modified gravity.

Parameters:
  • cosmo (ccl.cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
Returns:

Modification to Poisson equation

under modified gravity at scale factor a. Sig_MG is assumed to be proportional to Omega_Lambda(z), see e.g. Abbott et al. 2018, 1810.02499, Eq. 9.

Return type:

Sig_MG (float or array_like)

pyccl.background.comoving_angular_distance(cosmo, a)[source]

Comoving angular distance.

Note

This quantity is otherwise known as the transverse comoving distance, and is NOT angular diameter distance or angular separation. The comovoing angular distance is defined such that the comoving distance between two objects at a fixed scale factor separated by an angle :math:` heta` is :math:` heta D_{T}(a)` where \(D_{T}(a)\) is the comoving angular distance.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
Returns:

Comoving angular distance; Mpc.

Return type:

float or array_like

pyccl.background.comoving_radial_distance(cosmo, a)[source]

Comoving radial distance.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
Returns:

Comoving radial distance; Mpc.

Return type:

float or array_like

pyccl.background.distance_modulus(cosmo, a)[source]

Distance Modulus, defined as 5 * log(luminosity distance / 10 pc).

Note

The distance modulus can be used to convert between apparent and absolute magnitudes via m = M + distance modulus, where m is the apparent magnitude and M is the absolute magnitude.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
Returns:

Distance modulus at a.

Return type:

float or array_like

pyccl.background.growth_factor(cosmo, a)[source]

Growth factor.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
Returns:

Growth factor, normalized to unity today.

Return type:

float or array_like

pyccl.background.growth_factor_unnorm(cosmo, a)[source]

Unnormalized growth factor.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
Returns:

Unnormalized growth factor, normalized to the

scale factor at early times.

Return type:

float or array_like

pyccl.background.growth_rate(cosmo, a)[source]

Growth rate defined as the logarithmic derivative of the growth factor, dlnD/dlna.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
Returns:

Growth rate.

Return type:

float or array_like

pyccl.background.h_over_h0(cosmo, a)[source]

Ratio of Hubble constant at a over Hubble constant today.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
Returns:

H(a)/H0.

Return type:

float or array_like

pyccl.background.luminosity_distance(cosmo, a)[source]

Luminosity distance.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
Returns:

Luminosity distance; Mpc.

Return type:

float or array_like

pyccl.background.mu_MG(cosmo, a)[source]

Redshift-dependent modification to Poisson equation under modified gravity.

Parameters:
  • cosmo (ccl.cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
Returns:

Modification to Poisson equation

under modified gravity at a scale factor. mu_MG is assumed to be proportional to Omega_Lambda(z), see e.g. Abbott et al. 2018, 1810.02499, Eq. 9.

Return type:

mu_MG (float or array_like)

pyccl.background.omega_x(cosmo, a, species)[source]

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

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
  • species (string) –

    species type. Should be one of

    • ’matter’: cold dark matter, massive neutrinos, and baryons
    • ’dark_energy’: cosmological constant or otherwise
    • ’radiation’: relativistic species besides massless neutrinos
    • ’curvature’: curvature density
    • ’neutrinos_rel’: relativistic neutrinos
    • ’neutrinos_massive’: massive neutrinos
Returns:

Density fraction of a given species at a

scale factor.

Return type:

float or array_like

pyccl.background.rho_x(cosmo, a, species, is_comoving=False)[source]

Physical or comoving density as a function of scale factor.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.
  • a (float or array_like) – Scale factor(s), normalized to 1 today.
  • species (string) –

    species type. Should be one of

    • ’matter’: cold dark matter, massive neutrinos, and baryons
    • ’dark_energy’: cosmological constant or otherwise
    • ’radiation’: relativistic species besides massless neutrinos
    • ’curvature’: curvature density
    • ’neutrinos_rel’: relativistic neutrinos
    • ’neutrinos_massive’: massive neutrinos
  • is_comoving (bool) – either physical (False, default) or comoving (True)
Returns:

Physical density of a given species at a scale factor.

Return type:

rho_x (float or array_like)

pyccl.background.scale_factor_of_chi(cosmo, chi)[source]

Scale factor, a, at a comoving radial distance chi.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.
  • chi (float or array_like) – Comoving radial distance(s); Mpc.
Returns:

Scale factor(s), normalized to 1 today.

Return type:

float or array_like