pybird.nnlo module

class pybird.nnlo.NNLO_counterterm(load=True, save=True, path='./', NFFT=256, co=<pybird.common.Common object>)[source]

Bases: object

A class for computing next-to-next-to-leading-order counterterm corrections.

This class implements the k^4 P11 NNLO counterterm correction to the power spectrum and correlation function. It uses FFTLog to perform the spherical Bessel transforms between Fourier and configuration space.

co

Common parameters shared across calculations.

Type:

Common

fftsettings

Settings for FFTLog transforms (Nmax, xmin, xmax, bias).

Type:

dict

fft

FFTLog engine for spherical Bessel transforms.

Type:

FFTLog

Mcf

Transformation matrices for correlation function.

Type:

ndarray

sPow

Array of s^n powers for correlation function calculation.

Type:

ndarray

kdeep

Deep k-array for accurate Fourier transforms.

Type:

ndarray

smask_out

Mask for s values above threshold.

Type:

ndarray

smask_in

Mask for s values below threshold.

Type:

ndarray

swin

Window function for correlation function smoothing.

Type:

CoefWindow

setMcf()[source]

Compute transformation matrices for correlation function.

setsPow()[source]

Compute s^n powers for correlation function calculation.

CoefsPow(coef)[source]

Multiply coefficients with s^n powers.

Cf(bird, PEH_interp)[source]

Compute NNLO counterterm correlation function.

Ps(bird, PEH_interp)[source]

Compute NNLO counterterm power spectrum.

setMcf()[source]

Compute the next-to-next-to-leading counterterm correlation function matrices.

setsPow()[source]
CoefsPow(coef)[source]
Cf(bird, PEH_interp)[source]
Ps(bird, PEH_interp)[source]
class pybird.nnlo.NNLO_higher_derivative(xdata, with_cf=False, NFFT=256, co=<pybird.common.Common object>)[source]

Bases: object

A class for computing higher-derivative NNLO corrections.

This class implements the k^2 P1Loop NNLO correction to the power spectrum and correlation function. It provides the spherical Bessel transform between power spectrum and correlation function using FFTLog.

co

Common parameters shared across calculations.

Type:

Common

fftsettings

Settings for FFTLog transforms (Nmax, xmin, xmax, bias).

Type:

dict

fft

FFTLog engine for spherical Bessel transforms.

Type:

FFTLog

M

Transformation matrices for correlation function.

Type:

ndarray

sPow

Array of s^n powers for correlation function calculation.

Type:

ndarray

kdeep

Deep k-array for accurate Fourier transforms.

Type:

ndarray

kmask

Mask for k values below threshold.

Type:

ndarray

smask_out

Mask for s values above threshold.

Type:

ndarray

smask_in

Mask for s values below threshold.

Type:

ndarray

swin

Window function for correlation function smoothing.

Type:

CoefWindow

k

k-array for power spectrum calculations.

Type:

ndarray

setsPow(s)[source]

Compute s^n powers for correlation function calculation.

setM()[source]

Compute transformation matrices for correlation function.

FT(Ps, l, window)[source]

Compute spherical Bessel transform from power spectrum to correlation function.

Ps2Cf(Ps)[source]

Transform power spectrum multipoles to correlation function multipoles.

Cf(bird)[source]

Compute higher-derivative NNLO correlation function correction.

Ps(bird)[source]

Compute higher-derivative NNLO power spectrum correction.

setsPow(s)[source]

Multiply the coefficients with the s’s to the powers of the FFTLog.

setM()[source]

Compute the matrices of the spherical-Bessel transform from Ps to Cf. Called at instantiation.

FT(Ps, l=0, window=None)[source]

Compute the spherical Bessel transform from Ps to Cf

Ps2Cf(Ps)[source]
Cf(bird)[source]
Ps(bird)[source]