pybird.resum module
- class pybird.resum.Resum(LambdaIR=0.1, NFFT=192, fft=False, co=<pybird.common.Common object>)[source]
Bases:
object
A class for IR-resummation of the power spectrum and correlation function.
The Resum class performs the IR-resummation of the power spectrum by computing the bulk flow effects on the BAO feature. Two resummation schemes are available:
fullresum (default): FFTLog transforms are performed on the full integrands from s = 0.1 to s = 10000 Mpc/h. This is the more complete treatment.
optiresum: FFTLog transforms are performed only on the extracted BAO peak (after removing the broadband). The peak is padded with zeros and transforms run from s = 0.1 to s = 1000 Mpc/h. This is computationally faster.
- LambdaIR
Integral cutoff for IR-filters X and Y. Default is 0.2 for fullresum, but 1.0 works for either scheme.
- Type:
- # Correlation function arrays
- sr
Separation array for resummation.
- Type:
ndarray
- sbao
Separation array for BAO peak (optiresum).
- Type:
ndarray
- snobao
Separation array for broadband (optiresum).
- Type:
ndarray
- # Power spectrum arrays
- kr
Wavenumber array for resummation.
- Type:
ndarray
- k2p
Powers of k^2 for IR corrections.
- Type:
ndarray
- # FFTLog settings and objects
- M
Spherical Bessel transform matrices for IR corrections.
- Type:
ndarray
- kPow
k-dependent power terms for IR corrections.
- Type:
ndarray
- XM
Spherical Bessel transform matrices for IR-filters.
- Type:
ndarray
- XsPow
s-dependent power terms for IR-filters.
- Type:
ndarray
- Ml
Spherical Bessel transform matrices for correlation functions.
- Type:
ndarray
- sPow
s-dependent power terms for correlation functions.
- Type:
ndarray
- # Damping windows
- dampPs
Damping windows for power spectrum.
- Type:
ndarray
- dampCf
Damping window for correlation function.
- Type:
ndarray
- # Optimization paths
Initialize the Resum engine for IR-resummation calculations.
- Parameters:
LambdaIR (float, optional) – Integral cutoff for IR-filters X and Y in Mpc/h, by default 0.1
NFFT (int, optional) – Number of FFT points for transforms, by default 192
fft (bool, optional) – Whether to use O(NFFT logNFFT) FFT instead of O(NFFT x Nk) sum, by default False
co (Common, optional) – Common parameters object, by default co
Notes
The choice of LambdaIR depends on the resummation scheme: - fullresum: LambdaIR = 0.2 (default for complete treatment) - optiresum: LambdaIR = 1.0 (faster, works for either scheme)
- setXsPow()[source]
Multiply the coefficients with the s’s to the powers of the FFTLog to evaluate the IR-filters X and Y.
- setkPow()[source]
Multiply the coefficients with the k’s to the powers of the FFTLog to evaluate the IR-corrections.
- IRn(XpYpC)[source]
Compute the spherical Bessel transform in the IR correction of order n given [XY]^n
- extractBAO(cf)[source]
Given a correlation function cf, - if fullresum, return cf - if optiresum, extract the BAO peak
- setMl()[source]
Compute the power spectrum to correlation function spherical Bessel transform matrices. Called at the instantiation.
- setsPow()[source]
Multiply the coefficients with the s’s to the powers of the FFTLog to evaluate the IR corrections in configuration space.
- IRCf(bird)[source]
Compute the IR corrections in configuration space by spherical Bessel transforming the IR corrections in Fourier space.
- PsCf(bird, makeIR=True, makeQ=True, setIR=True, setPs=True, setCf=True)[source]
Perform IR-resummation for both power spectrum and correlation function.
This is the main method that applies IR-resummation to both the power spectrum and correlation function, handling the bulk flow effects on the BAO feature.
- Parameters:
bird (Bird) – Bird object containing the power spectrum and correlation function
makeIR (bool, optional) – Whether to compute IR-resummed power spectrum, by default True
makeQ (bool, optional) – Whether to compute the Q factors, by default True
setIR (bool, optional) – Whether to set IR-resummed components, by default True
setPs (bool, optional) – Whether to set power spectrum components, by default True
setCf (bool, optional) – Whether to set correlation function components, by default True
Notes
This method orchestrates the complete IR-resummation procedure, including computing Q factors, IR filters, and applying resummation to both Fourier and configuration space quantities.
- Ps(bird, makeIR=True, makeQ=True, setIR=True, setPs=True)[source]
Apply IR-resummation to the power spectrum.
Computes the IR-resummed power spectrum by applying bulk flow corrections to the BAO feature using the IR-resummation formalism.
- Parameters:
bird (Bird) – Bird object containing the power spectrum to be resummed
makeIR (bool, optional) – Whether to compute IR-resummed components, by default True
makeQ (bool, optional) – Whether to compute Q factors for resummation, by default True
setIR (bool, optional) – Whether to set IR components in the bird object, by default True
setPs (bool, optional) – Whether to set final power spectrum components, by default True
Notes
The IR-resummation process involves: 1. Computing Q factors from the growth rate 2. Computing IR-resummed power spectrum components 3. Setting the resummed components in the bird object