dsf.covariance.ingredients.cov_blocks module¶
Covariance blocks for projected Delta Sigma observables.
This module provides covariance terms for Delta Sigma data vectors built from
galaxy-matter and galaxy-galaxy projected correlations. The functions return
auto- and cross-covariance blocks for lensing-style gm measurements,
clustering-style gg measurements, and their joint covariance matrix.
The inputs are assumed to describe a single lens/source bin pair or an effective lens-bin average: galaxy-galaxy, galaxy-matter, and matter-matter power spectra, survey-volume factors, line-of-sight window integrals, noise terms, and the projected-radius binning used by the Delta Sigma data vector.
Optional tapering applies a smooth window to the low- and high-wavenumber
edges of the input spectra before projection. This reduces numerical ringing
from finite k coverage and makes the Hankel-projected covariance less
sensitive to abrupt power-spectrum cutoffs.
- dsf.covariance.ingredients.cov_blocks.delta_sigma_gg_covariance(hankel, k, pk_gg, *, rho_crit, delta_pi_gg, shot_noise, volume, rp_bin_edges=None, order=2, taper=True, taper_kwargs=None)[source]¶
Return the auto-covariance of the galaxy-galaxy Delta Sigma-like signal.
This block describes the uncertainty of the clustering-style projected galaxy-density measurement written in Delta Sigma units. It is controlled by the lens galaxy auto-power spectrum, lens shot noise, the line-of-sight depth of the lens bin, and the effective survey volume.
- Parameters:
hankel (HankelTransform) – Hankel transform object used to project Fourier-space covariance terms into projected-radius space.
k (NDArray[float64] | list[float] | tuple[float, ...]) – Wavenumber grid in
h / Mpc.pk_gg (NDArray[float64] | list[float] | tuple[float, ...]) – Lens-averaged galaxy-galaxy power spectrum evaluated on
k.rho_crit (float) – Critical density factor used to express the projected clustering covariance in Delta Sigma-like units.
delta_pi_gg (float) – Line-of-sight width or window factor for the galaxy-galaxy covariance block.
shot_noise (float) – Lens shot-noise contribution.
volume (float) – Effective survey volume for the lens bin.
rp_bin_edges (NDArray[float64] | list[float] | tuple[float, ...] | None) – Optional projected-radius bin edges for the final covariance.
order (int) – Bessel order associated with the projected statistic.
taper (bool) – Whether to smoothly suppress the edges of the input
krange before projection. This reduces artificial oscillations in projected-radius space caused by the finite Fourier-space range.taper_kwargs (dict | None) – Optional taper window settings. Accepted keys are
low_k_lower,low_k_upper,large_k_lower, andlarge_k_upper. If not provided, default windows are chosen from the first and last values ofk.
- Returns:
Projected radii and the
gg x ggDelta Sigma covariance matrix.- Return type:
tuple[ndarray, ndarray]
- dsf.covariance.ingredients.cov_blocks.delta_sigma_gm_covariance(hankel, k, pk_gg, pk_gm, pk_mm, *, omega_m, rho_crit, delta_pi_gm_squared_window, sigma_crit_squared_average, shape_noise, shot_noise, volume, rp_bin_edges=None, order=2, taper=True, taper_kwargs=None, gkgk_taper=False, gkgk_taper_kwargs=None)[source]¶
Return the auto-covariance of the galaxy-matter Delta Sigma signal.
This block describes the uncertainty of a Delta Sigma measurement from lens galaxy positions and source galaxy shapes. It combines the covariance from lens-density and shear fluctuations with the covariance from their shared matter fluctuations, including lens shot noise, source shape noise, survey volume, and squared line-of-sight window weighting.
- Parameters:
hankel (HankelTransform) – Hankel transform object used to project Fourier-space covariance terms into projected-radius space.
k (NDArray[float64] | list[float] | tuple[float, ...]) – Wavenumber grid in
h / Mpc.pk_gg (NDArray[float64] | list[float] | tuple[float, ...]) – Lens-averaged galaxy-galaxy power spectrum evaluated on
k.pk_gm (NDArray[float64] | list[float] | tuple[float, ...]) – Lens-averaged galaxy-matter power spectrum evaluated on
k.pk_mm (NDArray[float64] | list[float] | tuple[float, ...]) – Lens-averaged matter-matter power spectrum evaluated on
k.omega_m (float) – Present-day matter density parameter.
rho_crit (float) – Critical density factor used to convert matter fluctuations into Delta Sigma units.
delta_pi_gm_squared_window (float) – Squared line-of-sight window factor for the galaxy-matter auto-covariance.
sigma_crit_squared_average (float) – Effective average of \(\Sigma_c^2\) for the lens-source bin pair.
shape_noise (float) – Source shape-noise contribution.
shot_noise (float) – Lens shot-noise contribution.
volume (float) – Effective survey volume for the lens bin.
rp_bin_edges (NDArray[float64] | list[float] | tuple[float, ...] | None) – Optional projected-radius bin edges for the final covariance. If omitted, the covariance is returned on the Hankel radial grid.
order (int) – Bessel order associated with the projected Delta Sigma statistic.
taper (bool) – Whether to taper the lens-density and shear-fluctuation term before projection.
taper_kwargs (dict | None) – Optional taper settings for the lens-density and shear-fluctuation term.
gkgk_taper (bool) – Whether to taper the shared matter-fluctuation term before projection.
gkgk_taper_kwargs (dict | None) – Optional taper settings for the shared matter-fluctuation term.
- Returns:
Projected radii and the
gm x gmDelta Sigma covariance matrix.- Return type:
tuple[ndarray, ndarray]
- dsf.covariance.ingredients.cov_blocks.delta_sigma_gm_gg_cross_covariance(hankel, k, pk_gg, pk_gm, *, omega_m, rho_crit, delta_pi_gm_gg, shot_noise, volume, rp_bin_edges=None, order=2, taper=True, taper_kwargs=None)[source]¶
Return the cross-covariance between galaxy-matter and galaxy-galaxy signals.
This block describes how fluctuations in the lensing-style Delta Sigma measurement covary with fluctuations in the projected galaxy-density measurement. It couples the galaxy-matter and galaxy-galaxy power-spectrum terms through the shared lens density field and the relevant line-of-sight window overlap.
- Parameters:
hankel (HankelTransform) – Hankel transform object used to project Fourier-space covariance terms into projected-radius space.
k (NDArray[float64] | list[float] | tuple[float, ...]) – Wavenumber grid in
h / Mpc.pk_gg (NDArray[float64] | list[float] | tuple[float, ...]) – Lens-averaged galaxy-galaxy power spectrum evaluated on
k.pk_gm (NDArray[float64] | list[float] | tuple[float, ...]) – Lens-averaged galaxy-matter power spectrum evaluated on
k.omega_m (float) – Present-day matter density parameter.
rho_crit (float) – Critical density factor used to convert matter fluctuations into Delta Sigma units.
delta_pi_gm_gg (float) – Line-of-sight overlap factor between the
gmandggcovariance terms.shot_noise (float) – Lens shot-noise contribution.
volume (float) – Effective survey volume for the lens bin.
rp_bin_edges (NDArray[float64] | list[float] | tuple[float, ...] | None) – Optional projected-radius bin edges for the final covariance.
order (int) – Bessel order associated with the projected statistic.
taper (bool) – Whether to smoothly suppress the edges of the input
krange before projection. This reduces artificial oscillations in projected-radius space caused by the finite Fourier-space range.taper_kwargs (dict | None) – Optional taper window settings. Accepted keys are
low_k_lower,low_k_upper,large_k_lower, andlarge_k_upper. If not provided, default windows are chosen from the first and last values ofk.
- Returns:
Projected radii and the
gm x ggDelta Sigma cross-covariance matrix.- Return type:
tuple[ndarray, ndarray]
- dsf.covariance.ingredients.cov_blocks.joint_delta_sigma_covariance(cov_gm_gm, cov_gg_gg, cov_gm_gg)[source]¶
Return the joint covariance matrix for
gmandggDelta Sigma data.The output matrix is ordered with the galaxy-matter Delta Sigma data vector first and the galaxy-galaxy Delta Sigma-like data vector second. The off-diagonal blocks contain the cross-covariance between the two projected observables.
- Parameters:
cov_gm_gm (NDArray[float64] | list[float] | tuple[float, ...]) – Auto-covariance block for the galaxy-matter Delta Sigma signal.
cov_gg_gg (NDArray[float64] | list[float] | tuple[float, ...]) – Auto-covariance block for the galaxy-galaxy Delta Sigma-like signal.
cov_gm_gg (NDArray[float64] | list[float] | tuple[float, ...]) – Cross-covariance block between the
gmandggsignals.
- Returns:
Joint block covariance matrix ordered as
[DeltaSigma_gm, DeltaSigma_gg].- Return type:
ndarray