Non-linearities

For examples of use, look at The Halofit operator.

class colibri.nonlinear.Bird(z, k, pk, cosmology=<colibri.cosmology.cosmo object>)

The class Bird transforms a linear input power spectrum to its non-linear counterpart using the original Halofit model by Smith et al. corrected for the presence of massive neutrinos by Bird et al. (see arXiv:1109.4416 ). By calling this class, a non-linear power spectrum is returned. It accepts the following arguments, with the default values specified:

Parameters:
  • z (array) – Redshift.

  • k (array) – Scales in units of \(h/\mathrm{Mpc}\).

  • pk (2D array of shape (len(z), len(k))) – Linear power spectra evaluated in z and k in units of \((\mathrm{Mpc}/h)^3\).

  • cosmology (cosmo instance, default = cosmology.cosmo()) – Fixes the cosmological parameters. If not declared, the default values are chosen (see colibri.cosmology.cosmo() documentation).

Returns:

Nothing, but the quantity self.pk_nl is generated, a 2D array of shape (len(z), len(k)) containing the non-linear matter power spectra in units of \((\mathrm{Mpc}/h)^3\).

class colibri.nonlinear.HMcode2016(z, k, pk, cosmology=<colibri.cosmology.cosmo object>)

The class HMcode2016 transforms a linear input power spectrum to its non-linear counterpart using the Halofit model by Mead et al. (see arXiv:1602.02154 . By calling this class, a non-linear power spectrum is returned. It accepts the following arguments, with the default values specified:

Parameters:
  • z (array) – Redshift.

  • k (array) – Scales in units of \(h/\mathrm{Mpc}\).

  • pk (2D array of shape (len(z), len(k))) – Linear power spectra evaluated in z and k in units of \((\mathrm{Mpc}/h)^3\).

  • cosmology (cosmo instance, default = cosmology.cosmo()) – Fixes the cosmological parameters. If not declared, the default values are chosen (see colibri.cosmology.cosmo() documentation).

When the instance is called, the array self.mass = np.logspace(2., 18., 512), i.e. an array of masses spanning from \(100 M_\odot/h\) to \(10^{18} M_\odot/h\) is created, where all the mass functions are computed.

Returns:

Nothing, but the quantity self.pk_nl is generated, a 2D array of shape (len(z), len(k)) containing the non-linear matter power spectra in units of \((\mathrm{Mpc}/h)^3\).

class colibri.nonlinear.HMcode2020(z, k, pk_cc, pk_mm, cosmology=<colibri.cosmology.cosmo object>)

The class HMcode2020 transforms a linear input power spectrum to its non-linear counterpart using the Halofit model by Mead et al. (see arXiv:2009.01858 ).

Warning

It is quite slower than the one installed in CAMB or Class.

By calling this class, the total matter non-linear power spectrum is returned. It accepts the following arguments, with the default values specified:

Parameters:
  • z (array) – Redshift.

  • k (array) – Scales in units of \(h/\mathrm{Mpc}\).

  • pk_cc (2D array of shape (len(z), len(k))) – Linear cold dark matter (plus baryons) power spectra evaluated in z and k in units of \((\mathrm{Mpc}/h)^3\).

  • pk_mm (2D array of shape (len(z), len(k))) – Linear total matter power spectra evaluated in z and k in units of \((\mathrm{Mpc}/h)^3\).

  • cosmology (cosmo instance, default = cosmology.cosmo()) – Fixes the cosmological parameters. If not declared, the default values are chosen (see colibri.cosmology.cosmo() documentation).

When the instance is called, the array self.mass = np.logspace(2., 18., 512), i.e. an array of masses spanning from \(100 M_\odot/h\) to \(10^{18} M_\odot/h\) is created, where all the mass functions are computed.

Returns:

Nothing, but the quantity self.pk_nl is generated, a 2D array of shape (len(z), len(k)) containing the non-linear matter power spectra in units of \((\mathrm{Mpc}/h)^3\).

class colibri.nonlinear.Takahashi(z, k, pk, cosmology=<colibri.cosmology.cosmo object>)

The class Takahashi transforms a linear input power spectrum to its non-linear counterpart using the Halofit model by Takahashi et al. (see arXiv:1208.2701 ). By calling this class, a non-linear power spectrum is returned. It accepts the following arguments, with the default values specified:

Parameters:
  • z (array) – Redshift.

  • k (array) – Scales in units of \(h/\mathrm{Mpc}\).

  • pk (2D array of shape (len(z), len(k))) – Linear power spectra evaluated in z and k in units of \((\mathrm{Mpc}/h)^3\).

  • cosmology (cosmo instance, default = cosmology.cosmo()) – Fixes the cosmological parameters. If not declared, the default values are chosen (see colibri.cosmology.cosmo() documentation).

Returns:

Nothing, but the quantity self.pk_nl is generated, a 2D array of shape (len(z), len(k)) containing the non-linear matter power spectra in units of \((\mathrm{Mpc}/h)^3\).

class colibri.nonlinear.classic_halomodel(z, k, pk, cosmology=<colibri.cosmology.cosmo object>, pivot_concentration=9.0, slope_concentration=0.13, a_ShethTormen=0.707, p_ShethTormen=0.3)

The class classic_halomodel transforms a linear input power spectrum to its non-linear counterpart using the halo model as described in e.g. arXiv:0206508 .

By calling this class, the total matter non-linear power spectrum is returned. It accepts the following arguments, with the default values specified:

Parameters:
  • z (array) – Redshift.

  • k (array) – Scales in units of \(h/\mathrm{Mpc}\).

  • pk (2D array of shape (len(z), len(k))) – Linear total matter power spectra evaluated in z and k in units of \((\mathrm{Mpc}/h)^3\).

  • cosmology (cosmo instance, default = cosmology.cosmo()) – Fixes the cosmological parameters. If not declared, the default values are chosen (see colibri.cosmology.cosmo() documentation).

  • pivot_concentration (float, default = 9.) – concentration parameter at typical mass.

  • slope_concentration (float, default = 0.13) – slope of the mass-concentration relation (minus sign already included, set to positive here).

  • a_ShethTormen (float, default = 0.707) – Sheth-Tormen parameter.

  • p_ShethTormen (float, default = 0.3) – Sheth-Tormen parameter.

Returns:

Nothing, but the quantity self.pk_nl is generated, a 2D array of shape (len(z), len(k)) containing the non-linear matter power spectra in units of \((\mathrm{Mpc}/h)^3\).

class colibri.nonlinear.halomodel(z, k, pk, cosmology=<colibri.cosmology.cosmo object>, a_ShethTormen=0.707, p_ShethTormen=0.3)

The class halomodel transforms a linear input power spectrum to its non-linear counterpart using the halo model implemented in CAMB. For the ‘classic’ halo model see the class colibri.halo.halo() and e.g. arXiv:0206508 for a theoretical insight.

By calling this class, the total matter non-linear power spectrum is returned. It accepts the following arguments, with the default values specified:

Parameters:
  • z (array) – Redshift.

  • k (array) – Scales in units of \(h/\mathrm{Mpc}\).

  • pk (2D array of shape (len(z), len(k))) – Linear total matter power spectra evaluated in z and k in units of \((\mathrm{Mpc}/h)^3\).

  • cosmology (cosmo instance, default = cosmology.cosmo()) – Fixes the cosmological parameters. If not declared, the default values are chosen (see colibri.cosmology.cosmo() documentation).

When the instance is called, the array self.mass = np.logspace(2., 18., 512), i.e. an array of masses spanning from \(100 M_\odot/h\) to \(10^{18} M_\odot/h\) is created, where all the mass functions are computed.

Parameters:
  • a_ShethTormen (float, default = 0.707) – Sheth-Tormen parameter.

  • p_ShethTormen (float, default = 0.3) – Sheth-Tormen parameter.

Returns:

Nothing, but the quantity self.pk_nl is generated, a 2D array of shape (len(z), len(k)) containing the non-linear matter power spectra in units of \((\mathrm{Mpc}/h)^3\).