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_pdf_values()

Compute the PDF across a grid of kappa values using the Bromwich integral.

compute_phi_values()

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.

compute_phi_values()[source]

Compute the Legendre-transformed function φ(λ) from the SCGF.

Returns:

  • lambda_new (ndarray) – Imaginary grid of lambda values used for the inverse Laplace transform (Bromwich integral).

  • phi_values (ndarray) – Corresponding φ(λ) values used to compute the PDF.

get_scgf()[source]

Compute the scaled cumulant generating function (SCGF) for the given inputs.

Returns:

scgf – Array of SCGF values evaluated on the lambda grid.

Return type:

ndarray