pyccl.nl_pt.lpt module
- class pyccl.nl_pt.lpt.LagrangianPTCalculator(self, *, cosmo=None, log10k_min=-4, log10k_max=2, nk_per_decade=20, a_arr=None, k_cutoff=None, n_exp_cutoff=4, b1_pk_kind='nonlinear', bk2_pk_kind='nonlinear')[source]
Bases:
CCLAutoRepr
This class implements a set of methods that can be used to compute the various components needed to estimate Lagrangian perturbation theory correlations. These calculations are currently based on velocileptors (https://github.com/sfschen/velocileptors).
In the parametrisation used here, the galaxy overdensity is expanded as:
\[\delta_g=b_1\,\delta+\frac{b_2}{2}\delta^2+ \frac{b_s}{2}s^2+\frac{b_{3nl}}{2}O_{3}+ \frac{b_{k2}}{2}\nabla^2\delta.\]where
\[O_{3}(k) = s_{ij}(k)t_{ij}(k) + \frac{16}{63}\langle \delta_{lin}\rangle\]Note
As opposed to EPT, all terms including \(\nabla^2\delta\)) are taken into account in the expansion.
Note
Terms of the form \(\langle \delta^2 \psi_{nl}\rangle\) (and likewise for \(s^2\) and \(\nabla^2\delta\)) are set to zero.
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. IfNone
, you will need to initialize them using theupdate_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
orfloat
) – 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. IfNone
(default), no cutoff factor will be applied.n_exp_cutoff (
float
) – exponent of the cutoff factor (seek_cutoff
).b1_pk_kind (
str
) – power spectrum to use for the first-order bias terms in the expansion.'linear'
: use the linear matter power spectrum.'nonlinear'
: use the non-linear matter power spectrum.'pt'
: use the 1-loop SPT matter power spectrum.bk2_pk_kind (
str
) – power spectrum to use for the non-local bias terms in the expansion. Same options and default asb1_pk_kind
.
- 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 twoPTTracer
objects.- Parameters:
tracer1 (
PTTracer
) – the first tracer being correlated.tracer2 (
PTTracer
) – the second tracer being correlated. IfNone
, 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. SeePk2D
.extrap_order_hik (
int
) – extrapolation order to be used on k-values above the maximum of the splines. SeePk2D
.
- Returns:
PT power spectrum.
- Return type:
- 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 bykind
, which must be a string of the form'q1:q2'
, whereq1
andq2
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),'b3nl'
(\(\psi_{nl}\) 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. SeePk2D
.extrap_order_hik (
int
) – extrapolation order to be used on k-values above the maximum of the splines. SeePk2D
.
- Returns:
PT power spectrum.
- Return type: