pybird.projection module

pybird.projection.cH(Om, a)[source]

LCDM growth rate auxiliary function

pybird.projection.DgN(Om, a)[source]

LCDM growth rate auxiliary function

pybird.projection.fN(Om, z)[source]

LCDM growth rate

pybird.projection.Hubble(Om, z)[source]

LCDM AP parameter auxiliary function

pybird.projection.DA(Om, z)[source]

LCDM AP parameter auxiliary function

pybird.projection.W2D(x)[source]

Fiber collision effective window method auxiliary function

pybird.projection.Hllp(l, lp, x)[source]

Fiber collision effective window method auxiliary function

pybird.projection.fllp_IR(l, lp, k, q, Dfc)[source]

Fiber collision effective window method auxiliary function

pybird.projection.fllp_UV(l, lp, k, q, Dfc)[source]

Fiber collision effective window method auxiliary function

class pybird.projection.Projection(xout, with_ap=False, H_fid=None, D_fid=None, with_survey_mask=False, survey_mask_arr_p=None, survey_mask_mat_kp=None, with_binning=False, binsize=None, fibcol=False, with_wedge=0, wedge_mat_wl=None, with_redshift_bin=False, redshift_bin_zz=None, redshift_bin_nz=None, co=<pybird.common.Common object>)[source]

Bases: object

A class for applying observational projection effects to power spectra and correlation functions.

The Projection class handles various observational effects that transform the theoretical prediction into a form that can be directly compared with survey data. These effects include:

  • Alcock-Paczynski (AP) effect: Accounts for the distortion due to assuming an incorrect fiducial cosmology when converting redshifts to distances.

  • Survey window functions: Convolves the power spectrum with the survey mask.

  • k-binning or interpolation: Maps the model k-array to the data k-array.

  • Fiber collision corrections: Applies corrections for missing galaxy pairs due to fiber collisions in spectroscopic surveys.

  • Multipole to wedge conversion: Transforms multipole expansion to angular wedges.

  • Redshift bin evolution: Accounts for evolution of clustering across the redshift bin.

co

Common parameters object with configuration settings.

Type:

Common

cf

Whether working with correlation function (True) or power spectrum (False).

Type:

bool

xout

Output k or s array matching the data.

Type:

ndarray

# AP effect attributes
H_fid

Fiducial Hubble parameter.

Type:

float

D_fid

Fiducial angular diameter distance.

Type:

float

muacc

Mu grid for AP integration.

Type:

ndarray

sgrid, musgrid

Meshgrid of s and mu for correlation function.

Type:

ndarray

kgrid, mukgrid

Meshgrid of k and mu for power spectrum.

Type:

ndarray

arrayLegendremusgrid

Legendre polynomials evaluated on musgrid.

Type:

ndarray

arrayLegendremukgrid

Legendre polynomials evaluated on mukgrid.

Type:

ndarray

# Survey window attributes
arr_p

Array of p values for window function.

Type:

ndarray

mat_kp

Window function matrix.

Type:

ndarray

# Binning attributes
binvol

Volume of each k-bin.

Type:

ndarray

points

List of k-values within each bin.

Type:

list

# Wedge attributes
wedge_mat_wl

Transformation matrix from multipoles to wedges.

Type:

ndarray

# Redshift bin attributes
zz

Array of redshift values across the bin.

Type:

ndarray

nz

Number density as function of redshift.

Type:

ndarray

s, z1, mu

Meshgrid of separation, redshift and angle.

Type:

ndarray

n1

Number density evaluated on the meshgrid.

Type:

ndarray

L

Legendre polynomials for 3D reconstruction.

Type:

ndarray

Lp

Legendre polynomials for multipole integration.

Type:

ndarray

ft

Fourier transform object for s-k conversions.

Type:

FourierTransform

get_AP_param()[source]

Compute the AP parameters qperp and qpar.

integrAP()[source]

Perform AP integration over mu.

AP()[source]

Apply the AP effect to power spectrum or correlation function.

integrWindow()[source]

Convolve window function with power spectrum.

Window()[source]

Apply survey window function to power spectrum.

dPuncorr()[source]

Compute uncorrelated fiber collision contribution.

dPcorr()[source]

Compute correlated fiber collision contribution.

fibcolWindow()[source]

Apply fiber collision corrections.

loadBinning()[source]

Create bins for data k-array.

integrBinning()[source]

Integrate over each k-bin.

xbinning()[source]

Apply k-space binning for linear-spaced data.

xdata()[source]

Interpolate to data k-array.

integrWedges()[source]

Convert multipoles to wedges.

Wedges()[source]

Apply multipole to wedge transformation.

Wedges_external()[source]

Apply wedge transformation to external data.

mesheval1d()[source]

Evaluate 1D function on mesh grid.

redshift()[source]

Apply redshift evolution across the survey volume.

get_AP_param(bird=None, DA=None, H=None)[source]

Compute the AP parameters

integrAP(k, Pk, kp, arrayLegendremup)[source]

AP integration Credit: Jerome Gleyzes

AP(bird=None, q=None)[source]

Apply the AP effect to the bird power spectrum or correlation function Credit: Jerome Gleyzes

integrWindow(P)[source]

Convolve the window functions to a power spectrum P

Window(bird)[source]

Apply the survey window function to the bird power spectrum

dPuncorr(xout, fs=0.6, Dfc=0.6344990408735429)[source]

Compute the uncorrelated contribution of fiber collisions

kPS : a cbird wavenumber output, typically a (39,) np array fs : fraction of the survey affected by fiber collisions Dfc : angular distance of the fiber channel Dfc(z = 0.55) = 0.43Mpc

Credit: Thomas Colas

dPcorr(xout, kPS, PS, many=False, ktrust=0.25, fs=0.6, Dfc=0.6344990408735429)[source]

Compute the correlated contribution of fiber collisions

kPS : a cbird wavenumber output, typically a (39,) np array PS : a cbird power spectrum output, typically a (3, 39) np array ktrust : a UV cutoff fs : fraction of the survey affected by fiber collisions Dfc : angular distance of the fiber channel Dfc(z = 0.55) = 0.43Mpc

Credit: Thomas Colas

fibcolWindow(bird)[source]

Apply window effective method correction to fiber collisions to the bird power spectrum

loadBinning(xout, binsize)[source]

Create the bins of the data k’s

integrBinning(P)[source]

Integrate over each bin of the data k’s

xbinning(bird)[source]

Apply binning in k-space for linear-spaced data k-array

xdata(bird)[source]

Interpolate the bird power spectrum on the data k-array

integrWedges(P)[source]
Wedges(bird)[source]

Rotate multipoles to wedges

Wedges_external(P)[source]
mesheval1d(z1d, zm, func)[source]
redshift(bird, rz, Dz, fz, pk='Pk')[source]