pynbody.analysis.hmf.halo_bias

Contents

pynbody.analysis.hmf.halo_bias#

pynbody.analysis.hmf.halo_bias(context, M, kern='CK', pspec=<class 'pynbody.analysis.hmf.PowerSpectrumCAMB'>, delta_crit=1.686)[source]#

Return the halo bias for the given halo mass.

Parameters:
  • context (SimSnap) – The snapshot from which to pull the cosmological context

  • M (float) – The halo mass in Msol h^-1

  • kern (str or function, optional) – The kernel function describing the halo bias. Default is “CK” (Cole-Kaiser). Other options are “ST” (Sheth-Tormen). Alternatively a function can be provided.

  • pspec (PowerSpectrum, optional) – The power spectrum class to use, or if an instance is provided, the power spectrum to use. Default is PowerSpectrumCAMB which will attempt to calculate a power spectrum from the simulation context; if it fails, it will fall back to using Planck2018 power spectrum and issue a warning.

  • delta_crit (float, optional) – The critical overdensity for collapse. Default is 1.686.

Returns:

The halo bias for the given halo mass.

Return type:

float