pyccl.nl_pt.bacco_lbias module

class pyccl.nl_pt.bacco_lbias.BaccoLbiasCalculator(self, *, cosmo=None, log10k_min=-4, log10k_max=-0.47, nk_per_decade=20, a_arr=None, k_cutoff=None, n_exp_cutoff=4)[source]

Bases: CCLAutoRepr

This class implements a set of methods that can be used to compute the various components needed to estimate hybrid Lagrangian bias expansion correlations using the emulator baccoemu (https://bitbucket.org/rangulo/baccoemu/src/master/baccoemu/).

This is a hybrid model, featuring a second order Lagrangian bias expansion coupled with advecting the Lagrangian fields to Eulerian observables through N-body simulations. It has been tested to reproduce the galaxy-galaxy and galaxy-matter power spectra down to scales of 0.7 h/Mpc.

In the parametrisation used here, the bias function in Lagrangian coordinates is expanded as (ignoring constant terms):

\[w_{\rm g}(\boldsymbol{q})=1 + b_1\,\delta+(b_2/2)\,\delta^2+ (b_s/2)\,s^2+(b_{k2}/2)\nabla^2\delta.\]

This translates to Eulerian space

\[\delta(\boldsymbol{x}) = \int \mathrm{d}^3\boldsymbol{q} w_{\rm g}(\boldsymbol{q}) \delta^{\rm D}(\boldsymbol{x} - \boldsymbol{q} - \boldsymbol{\Psi}),\]

where the displacement field \(\Psi\) is obtained from simulations.

Note

This calculator does not account for any form of stochastic bias contribution to the power spectra. If necessary, consider adding it in post-processing.

Parameters:
  • cosmo (Cosmology) – a Cosmology object. If present, internal PT power spectrum templates will be initialized. If None, you will need to initialize them using the update_ingredients() method.

  • log10k_min (float) – decimal logarithm of the minimum Fourier scale (in \({\rm Mpc}^{-1}\)) for which you want to calculate perturbation theory quantities.

  • log10k_max (float) – decimal logarithm of the maximum Fourier scale (in \({\rm Mpc}^{-1}\)) for which you want to calculate perturbation theory quantities.

  • nk_per_decade (int or float) – number of k values per decade.

  • a_arr (array) – array of values of the scale factor at which all power spectra will be evaluated. If None, the default sampling used internally by CCL will be used. Note that this may be slower than a bespoke sampling optimised for your particular application.

  • k_cutoff (float) – exponential cutoff scale. All power spectra will be multiplied by a cutoff factor of the form \(\exp(-(k/k_*)^n)\), where \(k_*\) is the cutoff scale. This may be useful when using the resulting power spectra to compute correlation functions if some of the PT contributions do not fall sufficiently fast on small scales. If None (default), no cutoff factor will be applied.

  • n_exp_cutoff (float) – exponent of the cutoff factor (see k_cutoff).

property initialised
update_ingredients(cosmo)[source]

Update the internal PT arrays.

Parameters:

cosmo (Cosmology) – a Cosmology object.

get_biased_pk2d(tracer1, *, tracer2=None, extrap_order_lok=1, extrap_order_hik=2)[source]

Returns a Pk2D object containing the PT power spectrum for two quantities defined by two PTTracer objects.

Parameters:
  • tracer1 (PTTracer) – the first tracer being correlated.

  • tracer2 (PTTracer) – the second tracer being correlated. If None, the auto-correlation of the first tracer will be returned.

  • extrap_order_lok (int) – extrapolation order to be used on k-values below the minimum of the splines. See Pk2D.

  • extrap_order_hik (int) – extrapolation order to be used on k-values above the maximum of the splines. See Pk2D.

Returns:

PT power spectrum.

Return type:

Pk2D

get_pk2d_template(kind, *, extrap_order_lok=1, extrap_order_hik=2)[source]

Returns a Pk2D object containing the power spectrum template for two of the PT operators. The combination returned is determined by kind, which must be a string of the form 'q1:q2', where q1 and q2 denote the two operators whose power spectrum is sought. Valid operator names are: 'm' (matter overdensity), 'b1' (first-order overdensity), 'b2' (\(\delta^2\) term in galaxy bias expansion), 'bs' (\(s^2\) term in galaxy bias expansion), 'bk2' (non-local \(\nabla^2 \delta\) term in galaxy bias expansion)

Parameters:
  • kind (str) – string defining the pair of PT operators for which we want the power spectrum.

  • extrap_order_lok (int) – extrapolation order to be used on k-values below the minimum of the splines. See Pk2D.

  • extrap_order_hik (int) – extrapolation order to be used on k-values above the maximum of the splines. See Pk2D.

Returns:

PT power spectrum.

Return type:

Pk2D