pybird.bird module

class pybird.bird.Bird(cosmology=None, with_bias=True, eft_basis='eftoflss', with_stoch=False, with_nnlo_counterterm=False, co=<pybird.common.Common object>, which='full')[source]

Bases: object

Main class for computing power spectra and correlation functions for biased tracers.

The Bird (Biased tracers in redshift space) class computes the power spectrum and correlation function for biased tracers, given a cosmology and a set of EFT parameters. It implements perturbation theory calculations decomposed by multipoles and bias parameters, allowing for flexible assembly based on the chosen EFT basis.

co

Common parameters shared across calculations.

Type:

Common

with_bias

Whether to include bias parameters in the calculation.

Type:

bool

eft_basis

Basis for the EFT parameters (‘eftoflss’, ‘westcoast’, ‘eastcoast’).

Type:

str

with_stoch

Whether to include stochastic terms.

Type:

bool

with_nnlo_counterterm

Whether to include NNLO counterterms.

Type:

bool

with_tidal_alignments

Whether to include tidal alignment terms.

Type:

bool

kin

k-array on which the input linear power spectrum is evaluated.

Type:

ndarray

Pin

Input linear power spectrum.

Type:

ndarray

Plin

Interpolated function of the linear power spectrum.

Type:

callable

P11

Linear power spectrum evaluated on internal k-array.

Type:

ndarray

P22

Power spectrum 22-loop terms.

Type:

ndarray

P13

Power spectrum 13-loop terms.

Type:

ndarray

Ps

Power spectrum multipoles (linear, 1-loop, NNLO).

Type:

ndarray

C11

Correlation function multipole linear terms.

Type:

ndarray

C22l

Correlation function multipole 22-loop terms.

Type:

ndarray

C13l

Correlation function multipole 13-loop terms.

Type:

ndarray

Cct

Correlation function multipole counter terms.

Type:

ndarray

Cf

Correlation function multipoles (linear, 1-loop, NNLO).

Type:

ndarray

fullPs

Full power spectrum multipoles (linear + loop).

Type:

ndarray

fullCf

Full correlation function multipoles (linear + loop).

Type:

ndarray

b11

EFT parameters for linear terms per multipole.

Type:

ndarray

b13

EFT parameters for 13-loop terms per multipole.

Type:

ndarray

b22

EFT parameters for 22-loop terms per multipole.

Type:

ndarray

bct

EFT parameters for counter terms per multipole.

Type:

ndarray

f

Growth rate (for redshift space distortion).

Type:

float

DA

Angular distance (for AP effect).

Type:

float

H

Hubble parameter (for AP effect).

Type:

float

z

Redshift.

Type:

float

setcosmo()[source]

Set cosmological parameters and compute the linear power spectrum.

setBias()[source]

Set EFT parameters for different terms and multipoles.

setPs()[source]

Set power spectrum multipoles with provided bias parameters.

setCf()[source]

Set correlation function multipoles with provided bias parameters.

setPsCf()[source]

Set both power spectrum and correlation function multipoles.

setfullPs()[source]

Combine linear and loop parts for the full power spectrum.

setfullCf()[source]

Combine linear and loop parts for the full correlation function.

setPsCfl()[source]

Create multipoles for each term weighted by bias parameters.

reducePsCfl()[source]

Regroup terms that share the same EFT parameters.

setcosmo(cosmo)[source]
setBias(bias)[source]

Given an array of EFT parameters, set them among linear, loops and counter terms, and among multipoles

Parameters:

bs (array) – An array of 7 EFT parameters: b_1, b_2, b_3, b_4, c_{ct}/k_{nl}^2, c_{r,1}/k_{m}^2, c_{r,2}/k_{m}^2

setPs(bs=None, setfull=True)[source]

For option: which=’full’. Given an array of EFT parameters, multiplies them accordingly to the power spectrum multipole terms and adds the resulting terms together per loop order

Parameters:

bs (array) – An array of 7 EFT parameters: b_1, b_2, b_3, b_4, c_{ct}/k_{nl}^2, c_{r,1}/k_{m}^2, c_{r,2}/k_{m}^2

setCf(bs=None, setfull=True)[source]

For option: which=’full’. Given an array of EFT parameters, multiply them accordingly to the correlation function multipole terms

Parameters:

bs (array) – An array of 7 EFT parameters: b_1, b_2, b_3, b_4, c_{ct}/k_{nl}^2, c_{r,1}/k_{m}^2, c_{r,2}/k_{m}^2

setPsCf(bs, setfull=True)[source]

For option: which=’full’. Given an array of EFT parameters, multiply them accordingly to the power spectrum and correlation function multipole terms

Parameters:

bs (array) – An array of 7 EFT parameters: b_1, b_2, b_3, b_4, c_{ct}/k_{nl}^2, c_{r,1}/k_{m}^2, c_{r,2}/k_{m}^2

setfullPs()[source]

For option: which=’full’. Adds together the linear and the loop parts to get the full power spectrum multipoles

setfullCf()[source]

For option: which=’full’. Adds together the linear and the loop parts to get the full correlation function multipoles

setPsCfl(with_loop_and_cf=True)[source]

For option: which=’all’. Creates multipoles for each term weighted accordingly

reducePsCfl()[source]

For option: which=’all’. Regroups terms that share the same EFT parameter(s) (more generally, the same time functions)

reducePsCflf()[source]
setreducePslb(bs, what='full')[source]

For option: which=’all’. Given an array of EFT parameters, multiply them accordingly to the power spectrum multipole regrouped terms and adds the resulting terms together per loop order.

Parameters:

bs (array) – An array of 7 EFT parameters: b_1, b_2, b_3, b_4, c_{ct}/k_{nl}^2, c_{r,1}/k_{m}^2, c_{r,2}/k_{m}^2

setreduceCflb(bs, what='full')[source]

For option: which=’all’. Given an array of EFT parameters, multiply them accordingly to the correlation multipole regrouped terms and adds the resulting terms together per loop order.

Parameters:

bs (array) – An array of 7 EFT parameters: b_1, b_2, b_3, b_4, c_{ct}/k_{nl}^2, c_{r,1}/k_{m}^2, c_{r,2}/k_{m}^2

subtractShotNoise()[source]

For option: which=’all’. Subtract the constant stochastic term from the (22-)loop

concatenate()[source]
unravel(bird_1D)[source]
setIRPs(Q=None)[source]
setresumPs(setfull=True)[source]
setresumCf(setfull=True)[source]
settime(cosmo, co=None)[source]