pybird.fourier module

class pybird.fourier.FourierTransform(s=None, NFFT=512, co=<pybird.common.Common object>)[source]

Bases: object

A class to handle spherical Bessel transforms between correlation functions and power spectra.

The FourierTransform class implements efficient Fourier transforms using FFTLog to convert between configuration space (correlation functions) and Fourier space (power spectra). It handles multipole calculations and manages the transform settings for both directions.

co

Common parameters shared across calculations.

Type:

Common

fft

FFTLog instance for Cf → Ps transforms.

Type:

FFTLog

fftsettings

Settings for Cf → Ps FFTLog (Nmax, xmin, xmax, bias).

Type:

dict

M

Transformation matrix for Cf → Ps.

Type:

ndarray

kPow

k-dependent power terms for Cf → Ps.

Type:

ndarray

fftPs2Cf

FFTLog instance for Ps → Cf transforms.

Type:

FFTLog

fftPs2Cfsettings

Settings for Ps → Cf FFTLog (Nmax, xmin, xmax, bias).

Type:

dict

MPs2Cf

Transformation matrix for Ps → Cf.

Type:

ndarray

sPow

s-dependent power terms for Ps → Cf.

Type:

ndarray

setkPow()[source]

Compute k-dependent power terms for Cf → Ps transforms.

setM()[source]

Compute transformation matrix for Cf → Ps.

FT_Cf2Ps()[source]

Perform spherical Bessel transform from correlation function to power spectrum.

Cf2Ps()[source]

Transform all correlation function components to power spectra.

setsPow()[source]

Compute s-dependent power terms for Ps → Cf transforms.

setMPs2Cf()[source]

Compute transformation matrix for Ps → Cf.

FT_Ps2Cf()[source]

Perform spherical Bessel transform from power spectrum to correlation function.

Ps2Cf()[source]

Transform all power spectrum components to correlation functions.

setkPow()[source]

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

setM()[source]

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

FT_Cf2Ps(Cf, l=0, window=None)[source]

Compute the spherical Bessel transform from Cf to Ps

Cf2Ps(bird)[source]
setsPow(s=None)[source]

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

setMPs2Cf()[source]

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

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

Compute the spherical Bessel transform from Ps to Cf

Ps2Cf(bird)[source]