CAMB

class hmf.density_field.transfer_models.CAMB(*args, **kwargs)[source]

Transfer function computed by CAMB.

Parameters:
  • cosmo (astropy.cosmology.FLRW instance) – The cosmology used in the calculation

  • **model_parameters (unpack-dict) –

    Parameters specific to this model.

    camb_params: An instantiated CAMBparams object, pre-set with desired

    accuracy options etc.

    dark_energy_params: A dictionary of values passed to CAMB’s `

    set_dark_energy` method. Values include sound_speed and dark_energy_model.

    extrapolate_with_eh: Whether to extrapolate past the intrinsic CAMB

    kmax by using an EH model. Can cause some problems if kmax is high, since CAMB diverges from the EH approximation.

    matter_species: Which matter density field the transfer function

    describes: "cb" or "tot". "cb" uses CAMB’s Transfer_nonu (the CDM+baryon perturbation, \(\delta_{\rm cb}\)), while "tot" uses CAMB’s Transfer_tot (the total matter perturbation, \(\delta_{\rm tot}\), including massive neutrinos). The two are identical for massless neutrinos. Halo mass function fits calibrated on simulations with massive neutrinos should be used with "cb", since the HMF is found to be universal in terms of the CDM+baryon field (Costanzi et al. 2013; Castorina et al. 2014); it also matches mean_density0, which excludes neutrinos. The default, None, means "cb", with a warning if the cosmology has massive neutrinos (earlier versions of hmf used "tot"). By default sigma_8 still describes the total matter field; see sigma_8_species on the Transfer framework and Massive neutrinos: which matter field to use.

Notes

Neutrino masses are passed to CAMB via the mnu parameter (sum of neutrino masses in eV), from which CAMB computes the neutrino physical density omnuh2, and the individual masses in cosmo.m_nu set the number of massive species and their mass eigenstates. So m_nu=[0.1, 0.1, 0.1] eV is three massive species of 0.1 eV each (not one of 0.3 eV), which sets the free-streaming scale correctly. The cold dark matter density omch2 is set from astropy’s Odm0 attribute (i.e. cosmo.Odm0 * cosmo.h**2), which represents CDM-only density (excluding neutrinos and baryons). In astropy, Om0 represents the sum of CDM and baryonic matter only (not massive neutrinos), so Odm0 = Om0 - Ob0. The neutrino contribution to the matter budget is accounted for separately by CAMB from the mnu parameter, ensuring the total matter density (CDM + baryons + neutrinos) is correctly captured.

Attributes

references

References to cite when this model is used, each a formatted citation string.

Methods

classmethod get_models() → Mapping[str, type]

Get a read-only mapping of all implemented models for this component.

The mapping is a live view of the registry, so it shows models registered later, but it can not be used to add or remove models.

lnt(lnk)

Natural log of the transfer function.

Parameters:

lnk (array_like) – Wavenumbers [Mpc/h]

Returns:

lnt – The log of the transfer function at lnk.

Return type:

array_like