wale.ComputePDF module
- class wale.ComputePDF.computePDF(variables, variance, plot_scgf=False)[source]
Bases:
object
Compute the Probability Distribution Function (PDF) of the convergence field (kappa) using Large Deviation Theory (LDT) and the scaled cumulant generating function (SCGF).
This class takes a VariablesGenerator instance that encapsulates cosmological inputs, angular scales, redshift distributions, and lensing weights, along with a smoothed variance value.
The PDF is computed using the Legendre transform of the SCGF and the Bromwich integral.
- variables
Contains all required parameters like angles, redshifts, chi, weights, and lambda grid.
- Type:
VariablesGenerator
- variance
Smoothed variance σ²_κ(θ) for the angular scale and filter used.
- Type:
float
- plot_scgf
Whether to plot the SCGF during PDF computation.
- Type:
bool
- pdf_values
Computed PDF values over the kappa grid.
- Type:
list of float
- kappa_values
Grid of kappa values over which the PDF is evaluated.
- Type:
ndarray
Methods
compute_pdf_for_kappa
(kappa, lambda_new, ...)Evaluate the PDF at a given kappa using the inverse Laplace (Bromwich) integral.
Compute the PDF across a grid of kappa values using the Bromwich integral.
Compute the Legendre-transformed function φ(λ) from the SCGF.
get_scgf
()Compute the scaled cumulant generating function (SCGF) for the given inputs.
- compute_pdf_for_kappa(kappa, lambda_new, phi_values)[source]
Evaluate the PDF at a given kappa using the inverse Laplace (Bromwich) integral.
- Parameters:
kappa (float) – Value of the convergence (κ) for which the PDF is evaluated.
lambda_new (ndarray) – Array of complex λ values.
phi_values (ndarray) – Corresponding φ(λ) values.
- Returns:
pdf_kappa – Estimated value of the PDF at the given kappa.
- Return type:
float
- compute_pdf_values()[source]
Compute the PDF across a grid of kappa values using the Bromwich integral.
- Returns:
pdf_values (list of float) – Evaluated PDF values.
kappa_values (ndarray) – Grid of kappa values over which the PDF is computed.