firecrown.connector.mapping.MappingCAMB

firecrown.connector.mapping.MappingCAMB#

class firecrown.connector.mapping.MappingCAMB(*, require_nonlinear_pk=False)[source]#

Bases: Mapping

Mapping support for PyCAMB, the Python version of CAMB.

Note that the Python version of CAMB uses some different conventions from the Fortran version of CAMB. The two are not interchangeable.

Parameters:

require_nonlinear_pk (bool) –

Public Methods:

get_params_names()

Return the list of parameters handled by this mapping.

set_params_from_camb(**params_values)

Read the CAMB-style parameters from params_values.

Inherited from Mapping

__init__(*[, require_nonlinear_pk])

param require_nonlinear_pk:

get_params_names()

Return the names of the expected cosmological parameters for this mapping.

transform_k_h_to_k(k_h)

Transform the given k_h (k over h) to k.

transform_p_k_h3_to_p_k(p_k_h3)

Transform the given \(p_k h^3 \to p_k\).

transform_h_to_h_over_h0(h)

Transform distances h to \(h/h_0\).

set_params(*, Omega_c, Omega_b, h[, A_s, sigma8])

Sets the cosmological constants suitable a pyccl.core.CosmologyCalculator.

redshift_to_scale_factor(z)

Converts redshift to scale factor.

redshift_to_scale_factor_p_k(p_k)

Converts power spectrum from redshift to scale factor.

asdict()

Return a dictionary containing the cosmological constants.

get_H0()

Return the value of H0.


get_params_names()[source]#

Return the list of parameters handled by this mapping.

Return type:

list[str]

set_params_from_camb(**params_values)[source]#

Read the CAMB-style parameters from params_values.

Then, translate them to our conventions, and store them.