In this section, we briefly discuss the methods implemented for computing the transfer function. In particular, in addition to the existing EH method, we have added the BBKS method in the code. See Chisari et al. 2019 for further details.
The analytical expression for the BBKS approximation to the transfer function is given by:
where \(q\) is measured in \(\textrm{Mpc}^{-1}\) and is given by:
Code
Calculates the BBKS transfer function based on the cosmological parameters and wavenumber.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cosmo
|
Cosmology
|
An object containing cosmological parameters. Expected attributes:
|
required |
k
|
float or ndarray
|
Wavenumber in units of h Mpc⁻¹. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
float or numpy.ndarray: The BBKS transfer function for the given wavenumber. |
Notes
- The input wavenumber
kis in units of h Mpc⁻¹, but the internal calculations useqin units of Mpc⁻¹. - The transfer function is computed using the formula from Sugiyama (1995).
Source code in jax_cosmo/transfer.py
Emulator
We also have an emulator build to compute the linear matter power spectrum directly. It takes advantage of the fact that the linear matter power spectrum at any redshift can be computed as the product of the growth factor and the linear matter power spectrum at a fixed redshift, \(z_{0}\), that is,
In this case, \(\boldsymbol{\theta}\) is the set of cosmological parameters for the emulator,
without the \(h^{2}\) factor for \(\Omega_{\text{cdm}}\) and \(\Omega_{b}\). The emulator is built over the following prior range:
| \(\boldsymbol{\theta}\) | Distribution | Minimum | Scale | Fiducial |
|---|---|---|---|---|
| \(\sigma_8\) | Uniform | 0.6 | 0.4 | 0.8 |
| \(\Omega_{\text{cdm}}\) | Uniform | 0.07 | 0.43 | 0.2 |
| \(\Omega_b\) | Uniform | 0.028 | 0.027 | 0.04 |
| \(h\) | Uniform | 0.64 | 0.18 | 0.7 |
| \(n_s\) | Uniform | 0.87 | 0.2 | 1.0 |
Neutrino mass is fixed, that is, \(\sum m_{\nu}=0.06\,\text{eV}\) and the settings for generating the training set using classy is as follows:
- \(z_{\text{min}}=0.0\)
- \(z_{\text{max}}=3.0\)
- \(k_{\text{min}}=10^{-4}\;\text{Mpc}^{-1}\)
- \(k_{\text{max}}=50\;\text{Mpc}^{-1}\)
- \(\Omega_{k}=0\).
A minimal example of how we can use the emulator is as follows:
from jax_cosmo.core import Cosmology
from jax_cosmo.power import linear_matter_power_emu
# define the cosmology
cosmo_jax = Cosmology(Omega_c=0.25, Omega_b=0.05, h=0.7, sigma8 = 0.8, n_s=0.96,
Omega_k=0., w0=-1., wa=0., Neff = 3.044)
# compute the linear matter power spectrum
plin_emu = linear_matter_power_emu(cosmo, k=0.01, a=1.0)