halomod.bias

Module defining halo bias models.

The halo bias is defined as the ratio of the power spectrum of halo (centres) for halos of a given mass, to the linear matter power spectrum. In particular, it is assumed for the models defined here that the power spectrum of halo centres is merely a scalar multiple of the linear matter power spectrum. That is, we implement first-order, local, deterministic bias.

Bias models are defined as Component instances – that is, they are flexible models that the user can subclass and use in the halo model framework. See Bias for instructions on how to use Bias models. The following notes will mostly describe how to subclass Bias to define your own model.

Also provided are several models from the literature.

In addition, it defines a factory function make_colossus_bias() which helps with integration with the colossus cosmology code. With this function, the user is able to easily create a halomod-compatible Component model that transparently uses colossus the background to do the actual computation of the halo bias. This means it is easy to use any of the updated models from colossus in a native way.

Most models are specified in terms of the peak-height parameter, though it is possible to specify them in terms of mass, and include cosmological parameters.

To define your own bias model, subclass either Bias or any of the in-built models provided here. The only method required to be implemented is bias(), which takes no parameters. It must return the local first-order bias as an array of the same shape as m (you also have access to the peak-height nu as an instance variable). See documentation for Bias for more information on the instance variables available in the definition.

As with all Component subclasses, arbitrary user-specified variables can be received by defining them in the _defaults class-level dictionary.

The module also defines a ScaleDependentBias, which corrects the bias function on different length scales.

Examples

Define your own bias model that is unity for all masses (in fact this one is already built-in):

>>> class UnityBias(Bias):
>>>    def bias(self):
>>>        return np.ones_like(self.m)

Use this bias model in a halo model:

>>> from halomod import HaloModel
>>> hm = HaloModel(bias_model=UnityBias)
>>> assert np.all(hm.bias == 1)

Constructing and using a colossus-based halo bias:

>>> from halomod import HaloModel
>>> from halomod.bias import make_colossus_bias
>>> comparat = bias.make_colossus_bias(model="comparat17")
>>> hm = HaloModel(bias_model=comparat)

Functions

make_colossus_bias([model, mdef])

A factory function which helps with integration with the colossus cosmology code.

Classes

Bias(nu, delta_c, m, mstar, delta_halo, n, …)

The base Bias component.

Jing98(nu, delta_c, m, mstar, delta_halo, n, …)

Empirical bias of Jing (1998).

Mandelbaum05(nu, delta_c, m, mstar, …[, …])

Empirical bias of Mandelbaum (2005).

Manera10(nu, delta_c, m, mstar, delta_halo, …)

Peak-background split bias from Manera et al. (2010) [Re6c54aac682e-1].

Mo96(nu, delta_c, m, mstar, delta_halo, n, …)

Peak-background split bias corresponding to PS HMF.

Pillepich10(nu, delta_c, m, mstar, …[, …])

Empirical bias of Pillepich et al (2010).

SMT01(nu, delta_c, m, mstar, delta_halo, n, …)

Extended Press-Schechter-derived bias function corresponding to SMT01 HMF.

ST99(nu, delta_c, m, mstar, delta_halo, n, …)

Peak-background split bias corresponding to ST99 HMF.

ScaleDepBias(xi_dm, **model_parameters)

Base class for scale-dependent bias models.

Seljak04(nu, delta_c, m, mstar, delta_halo, …)

Empirical bias relation from Seljak & Warren (2004), without cosmological dependence.

Seljak04Cosmo(nu, delta_c, m, mstar, …[, …])

Empirical bias relation from Seljak & Warren (2004), with cosmological dependence.

Tinker05(nu, delta_c, m, mstar, delta_halo, …)

Empirical bias from Tinker et al (2005).

Tinker10(nu, delta_c, m, mstar, delta_halo, …)

Empirical bias of Tinker et al (2010).

Tinker10PBSplit(nu, delta_c, m, mstar, …)

Empirical bias of Tinker et al (2010).

TinkerSD05(xi_dm, **model_parameters)

Scale-dependent bias from Tinker 2005.

UnityBias(nu, delta_c, m, mstar, delta_halo, …)

A toy bias model which is exactly unity for all mass.