pyccl.nl_pt.ept module
- class pyccl.nl_pt.ept.EulerianPTCalculator(self, *, with_NC=False, with_IA=False, with_matter_1loop=True, 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', pad_factor=1.0, low_extrap=-5.0, high_extrap=3.0, P_window=None, C_window=0.75, sub_lowk=False)[source]
Bases:
CCLAutoRepr
This class implements a set of methods that can be used to compute the various components needed to estimate Eulerian perturbation theory correlations. These calculations are currently based on FAST-PT (https://github.com/JoeMcEwen/FAST-PT).
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}\psi_{nl}+ \frac{b_{k2}}{2}\nabla^2\delta.\]In turn, the intrinsic alignment component is expanded as
\[s^I_{ij}=c_1\,s_{ij}+c_2(s_{ik}s_{jk}-s^2\delta_{ik}/3) +c_\delta\,\delta\,s_{ij}\](note that the higher-order terms are not divided by 2!).
Note
Only the leading-order non-local term (i.e. \(\langle \delta\,\nabla^2\delta\)) is taken into account in the expansion. All others are set to zero.
Note
Terms of the form \(\langle \delta^2 \psi_{nl}\rangle\) (and likewise for \(s^2\)) are set to zero.
Warning
The full non-linear model for the cross-correlation between number counts and intrinsic alignments is still work in progress in FastPT. As a workaround CCL assumes a non-linear treatment of IAs, but only linearly biased number counts.
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:
with_NC (
bool
) – set toTrue
if you’ll want to use this calculator to compute correlations involving number counts.with_IA (
bool
) – set toTrue
if you’ll want to use this calculator to compute correlations involving intrinsic alignments.with_matter_1loop (
bool
) – set toTrue
if you’ll want to use this calculator to compute the one-loop matter power spectrum (automatically on ifwith_NC==True
).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
.pad_factor (
float
) – fraction of the \(\log_{10}(k)\) interval you to add as padding for FFTLog calculations.low_extrap (
float
) – decimal logaritm of the minimum Fourier scale (in \({\rm Mpc}^{-1}\)) for which FAST-PT will extrapolate.high_extrap (
float
) – decimal logaritm of the maximum Fourier scale (in \({\rm Mpc}^{-1}\)) for which FAST-PT will extrapolate.P_window (array) – 2-element array describing the tapering window used by FAST-PT. See FAST-PT documentation for more details.
C_window (
float
) – C_window parameter used by FAST-PT to smooth the edges and avoid ringing. See FAST-PT documentation for more details.sub_lowk (
bool
) – ifTrue
, the small-scale white noise contribution to some of the terms will be subtracted.
- property initialised
- update_ingredients(cosmo)[source]
Update the internal PT arrays.
- Parameters:
cosmo (
Cosmology
) – a Cosmology object.
- get_biased_pk2d(tracer1, *, tracer2=None, return_ia_bb=False, 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.Note
The full non-linear model for the cross-correlation between number counts and intrinsic alignments is still work in progress in FastPT. As a workaround CCL assumes a non-linear treatment of IAs, but only linearly biased number counts.
- 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.return_ia_bb (
bool
) – ifTrue
, the B-mode power spectrum for intrinsic alignments will be returned (if both input tracers are of typePTIntrinsicAlignmentTracer
) IfFalse
(default) E-mode power spectrum is 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, return_ia_bb=False)[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),'c1'
(linear IA term),'c2'
(\(s^2\) term in IA expansion),'cdelta'
(\(s\delta\) term in IA 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
.return_ia_bb (
bool
) – ifTrue
, the B-mode power spectrum for intrinsic alignments will be returned (if both input tracers are of typePTIntrinsicAlignmentTracer
) IfFalse
(default) E-mode power spectrum is returned.
- Returns:
PT power spectrum.
- Return type: