pyccl.halos.halo_model_base module
- class pyccl.halos.halo_model_base.HMIngredients(self, *, mass_def, mass_def_strict=True)[source]
Bases:
CCLAutoRepr
,CCLNamedClass
Base class for halo model ingredients.
- class pyccl.halos.halo_model_base.Concentration(self, *, mass_def)[source]
Bases:
HMIngredients
This class enables the calculation of halo concentrations.
- Parameters:
mass_def (
MassDef
) – a mass definition object or a name string.
- class pyccl.halos.halo_model_base.MassFunc(self, *, mass_def, mass_def_strict=True)[source]
Bases:
HMIngredients
This class enables the calculation of halo mass functions. We currently assume that all mass functions can be written as
\[\frac{dn}{d\log_{10}M} = f(\sigma_M)\,\frac{\rho_M}{M}\, \frac{d\log \sigma_M}{d\log_{10} M}\]where \(\sigma_M^2\) is the overdensity variance on spheres with a radius given by the Lagrangian radius for mass M.
Subclasses implementing analytical mass function parametrizations can be created by overriding the
_get_fsigma
method.Subclasses may have particular implementations of
_check_mass_def_strict
to ensure consistency of the halo mass definition.Subclasses for parametrizations that cannot be written in terms of \(\sigma_M\) can simply overload the
__call__()
method.
- Parameters:
- class pyccl.halos.halo_model_base.HaloBias(self, *, mass_def, mass_def_strict=True)[source]
Bases:
HMIngredients
This class enables the calculation of halo bias functions. We currently assume that all halo bias functions can be written as functions that depend on \(M\) only through \(\sigma_M\) (where \(\sigma_M^2\) is the overdensity variance on spheres with a radius given by the Lagrangian radius for mass \(M\)). All sub-classes implementing specific parametrizations can therefore be simply created by replacing this class’
_get_bsigma
method. New classes departing from this paradigm can simply overload the__call__()
method.- Parameters:
- pyccl.halos.halo_model_base.get_delta_c(cosmo, a, kind='EdS')[source]
Returns the linear collapse threshold.
- Parameters:
cosmo (
Cosmology
) – A Cosmology object.a (
float
or array) – scale factor.kind (
str
) –prescription to use. Should be one of
’EdS’: the SC prediction in Einstein de-Sitter, \(\delta_c=(3/20)(12\pi)^{2/3}\).
’EdS_approx’: a common approximation to the EdS result \(\delta_c=1.686\).
’NakamuraSuto97’: the prescription from Nakamura & Suto 1997.
’Mead16’: the prescription from Mead et al. 2016.
- Returns:
linear collapse threshold.
- Return type:
(
float
or array)