pyccl.power module

pyccl.power.linear_power(cosmo, k, a, *, p_of_k_a='delta_matter:delta_matter')[source]

The linear power spectrum.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.

  • k (float or array) – Wavenumber; \({\rm Mpc}^{-1}\).

  • a (float or array) – Scale factor.

  • p_of_k_a (str) – string specifying the power spectrum to compute (which should be stored in cosmo). Defaults to the linear matter power spectrum.

Returns:

Linear power spectrum.

Return type:

(float or array)

pyccl.power.nonlin_power(cosmo, k, a, *, p_of_k_a='delta_matter:delta_matter')[source]

The non-linear power spectrum.

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.

  • k (float or array) – Wavenumber; \({\rm Mpc}^{-1}\).

  • a (float or array) – Scale factor.

  • p_of_k_a (str) – string specifying the power spectrum to compute (which should be stored in cosmo). Defaults to the non-linear matter power spectrum.

Returns:

Non-linear power spectrum.

Return type:

(float or array)

pyccl.power.linear_matter_power(cosmo, k, a)[source]

The linear matter power spectrum

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.

  • k (float or array) – Wavenumber; \({\rm Mpc}^{-1}\).

  • a (float or array) – Scale factor.

Returns:

Linear matter power spectrum; \({\rm Mpc}^3\).

Return type:

(float or array)

pyccl.power.nonlin_matter_power(cosmo, k, a)[source]

The nonlinear matter power spectrum

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.

  • k (float or array) – Wavenumber; \({\rm Mpc}^{-1}\).

  • a (float or array) – Scale factor.

Returns:

Nonlinear matter power spectrum; \({\rm Mpc}^3\).

Return type:

(float or array)

pyccl.power.sigmaM(cosmo, M, a)[source]

RMS on the scale of a halo of mass \(M\). Calculated as \(\sigma_R\) (see sigmaR()) with \(R\) being the Lagrangian radius of a halo of mass \(M\) (see mass2radius_lagrangian()).

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.

  • M (float or array) – Halo masses.

  • a (float) – scale factor.

Returns:

RMS variance of halo mass.

Return type:

(float or array)

pyccl.power.sigmaR(cosmo, R, a=1, *, p_of_k_a='delta_matter:delta_matter')[source]

RMS of the matter overdensity a top-hat sphere of radius \(R\).

\[\sigma_R^2(z)=\frac{1}{2\pi^2}\int dk\,k^2\,P(k,z)\, |W(kR)|^2,\]

with \(W(x)=(3\sin(x)-x\cos(x))/x^3\).

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.

  • R (float or array) – Radius; Mpc.

  • a (float) – optional scale factor.

  • p_of_k_a (Pk2D, str or None) – power spectrum to integrate. If a string, it must correspond to one of the linear power spectra stored in cosmo (e.g. 'delta_matter:delta_matter').

Returns:

\(\sigma_R\).

Return type:

(float or array)

pyccl.power.sigmaV(cosmo, R, a=1, *, p_of_k_a='delta_matter:delta_matter')[source]

RMS of the linear displacement field in a top-hat sphere of radius R.

\[\sigma_V^2(z)=\frac{1}{6\pi^2}\int dk\,P(k,z)\,|W(kR)|^2,\]

with \(W(x)=(3\sin(x)-x\cos(x))/x^3\).

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.

  • R (float or array) – Radius; Mpc.

  • a (float) – optional scale factor.

  • p_of_k_a (Pk2D, str or None) – power spectrum to integrate. If a string, it must correspond to one of the linear power spectra stored in cosmo (e.g. 'delta_matter:delta_matter').

Returns:

\(\sigma_V\) (\({\rm Mpc}\)).

Return type:

(float or array)

pyccl.power.sigma8(cosmo, *, p_of_k_a='delta_matter:delta_matter')[source]

RMS variance in a top-hat sphere of radius \(8\,{\rm Mpc}/h\), (with the value of \(h\) extracted from cosmo) at \(z=0\).

Parameters:
  • cosmo (Cosmology) – Cosmological parameters.

  • p_of_k_a (Pk2D, str or None) – power spectrum to integrate. If a string, it must correspond to one of the linear power spectra stored in cosmo (e.g. 'delta_matter:delta_matter').

Returns:

\(\sigma_8\).

Return type:

float

pyccl.power.kNL(cosmo, a, *, p_of_k_a='delta_matter:delta_matter')[source]

Non-linear scale \(k_{\rm NL}\). Calculated based on Lagrangian perturbation theory as the inverse of the rms of the displacement field, i.e.:

\[k_{\rm NL}(z) = \left[\frac{1}{6\pi^2} \int dk\,P_L(k,z)\right]^{-1/2}.\]
Parameters:
  • cosmo (Cosmology) – Cosmological parameters.

  • a (float or array) – Scale factor(s), normalized to 1 today.

  • p_of_k_a (Pk2D, str or None) – power spectrum to integrate. If a string, it must correspond to one of the linear power spectra stored in cosmo (e.g. 'delta_matter:delta_matter').

Returns:

\(k_{\rm NL}\).

Return type:

float or array