dsf.covariance.ingredients.geometry module¶
Geometry ingredients for DeltaSigma covariance calculations.
This module converts tomographic redshift-bin metadata and cosmology into the geometry quantities needed by the DeltaSigma covariance blocks.
Bin edges and redshift distributions are supplied by the tomography layer. This module then computes cosmology-dependent distances, line-of-sight depths, survey volumes, effective distances, and lens number densities.
- dsf.covariance.ingredients.geometry.delta_pi_from_window(pi, window, *, squared)[source]¶
Return a line-of-sight window integral.
- Parameters:
pi (ndarray[tuple[Any, ...], dtype[float64]]) – Line-of-sight separation grid in
Mpc / h.window (ndarray[tuple[Any, ...], dtype[float64]]) – Dimensionless window evaluated on
pi.squared (bool) – Whether to integrate the squared window.
- Returns:
Integrated line-of-sight window factor in
Mpc / h.- Return type:
float
- dsf.covariance.ingredients.geometry.delta_pi_gg_from_edges(cosmo, *, z_min, z_max, h=None)[source]¶
Return the line-of-sight width of a lens redshift bin.
- Parameters:
cosmo (Cosmology) – CCL cosmology object.
z_min (float) – Lower lens-bin redshift edge.
z_max (float) – Upper lens-bin redshift edge.
h (float | None) – Dimensionless Hubble parameter. If not supplied, read from
cosmo["h"].
- Returns:
Comoving line-of-sight width in
Mpc / h.- Return type:
float
- dsf.covariance.ingredients.geometry.delta_pi_gm_factors(cosmo, *, z_lens, nz_lens, z_source, nz_source, z_min, z_max, z_center, sigma_crit_prefactor, pi=None, gm_window=None, h=None)[source]¶
Return line-of-sight factors for DeltaSigma
gmcovariance blocks.- Parameters:
cosmo (Cosmology) – CCL cosmology object.
z_lens (ndarray[tuple[Any, ...], dtype[float64]]) – Lens redshift grid.
nz_lens (ndarray[tuple[Any, ...], dtype[float64]]) – Normalized lens redshift distribution.
z_source (ndarray[tuple[Any, ...], dtype[float64]]) – Source redshift grid.
nz_source (ndarray[tuple[Any, ...], dtype[float64]]) – Normalized source redshift distribution.
z_min (float) – Lower lens-bin redshift edge.
z_max (float) – Upper lens-bin redshift edge.
z_center (float) – Effective or central lens redshift.
sigma_crit_prefactor (float) – Unit-conversion prefactor used by the critical-surface-density ingredient.
pi (ndarray[tuple[Any, ...], dtype[float64]] | None) – Optional line-of-sight separation grid in
Mpc / h.gm_window (ndarray[tuple[Any, ...], dtype[float64]] | None) – Optional galaxy-matter lensing window evaluated on
pi.h (float | None) – Dimensionless Hubble parameter. If not supplied, read from
cosmo["h"].
- Returns:
The
gm x gmandgm x ggline-of-sight factors inMpc / h.- Return type:
tuple[float, float]
- dsf.covariance.ingredients.geometry.delta_pi_gm_from_window(pi, window)[source]¶
Return the squared line-of-sight window factor for
gm x gm.- Parameters:
pi (ndarray[tuple[Any, ...], dtype[float64]]) – Line-of-sight separation grid in
Mpc / h.window (ndarray[tuple[Any, ...], dtype[float64]]) – Dimensionless lensing window evaluated on
pi.
- Returns:
Squared-window line-of-sight factor in
Mpc / h.- Return type:
float
- dsf.covariance.ingredients.geometry.delta_pi_gm_gg_from_window(pi, window, *, pi_min, pi_max)[source]¶
Return the line-of-sight overlap factor for
gm x gg.- Parameters:
pi (ndarray[tuple[Any, ...], dtype[float64]]) – Line-of-sight separation grid in
Mpc / h.window (ndarray[tuple[Any, ...], dtype[float64]]) – Dimensionless lensing window evaluated on
pi.pi_min (float) – Lower line-of-sight limit in
Mpc / h.pi_max (float) – Upper line-of-sight limit in
Mpc / h.
- Returns:
Cross-window line-of-sight factor in
Mpc / h.- Return type:
float
- dsf.covariance.ingredients.geometry.effective_comoving_distance(cosmo, z, nz, *, h=None)[source]¶
Return the effective comoving distance of a tomographic sample.
- Parameters:
cosmo (Cosmology) – CCL cosmology object.
z (ndarray[tuple[Any, ...], dtype[float64]]) – Redshift grid.
nz (ndarray[tuple[Any, ...], dtype[float64]]) – Normalized redshift distribution evaluated on
z.h (float | None) – Dimensionless Hubble parameter. If not supplied, read from
cosmo["h"].
- Returns:
Mean comoving radial distance in
Mpc / h.- Return type:
float
- dsf.covariance.ingredients.geometry.gm_lensing_window(cosmo, *, z_lens, nz_lens, z_source, nz_source, sigma_crit_prefactor, pi=None, h=None, pi_min=0.1, pi_max=3000.0, n_pi=4000, z_interp_max=None, n_z_interp=10000)[source]¶
Return the galaxy-matter lensing line-of-sight window.
The returned window is the dimensionless
W(Pi)factor used for thegm x gmandgm x ggDeltaSigma covariance line-of-sight integrals. It follows the same structure as the legacy calculation: averageSigma_crit^{-1}over source redshifts at displaced lens positions, average that quantity over the lens redshift distribution, and multiply by the effectiveSigma_critnormalization for the lens-source pair.- Parameters:
cosmo (Cosmology) – CCL cosmology object.
z_lens (ndarray[tuple[Any, ...], dtype[float64]]) – Lens redshift grid.
nz_lens (ndarray[tuple[Any, ...], dtype[float64]]) – Normalized lens redshift distribution.
z_source (ndarray[tuple[Any, ...], dtype[float64]]) – Source redshift grid.
nz_source (ndarray[tuple[Any, ...], dtype[float64]]) – Normalized source redshift distribution.
sigma_crit_prefactor (float) – Unit-conversion prefactor used by the critical-surface-density ingredient.
pi (ndarray[tuple[Any, ...], dtype[float64]] | None) – Optional line-of-sight separation grid in
Mpc / h. If not supplied, a symmetric logarithmic grid from-pi_maxtopi_maxis built.h (float | None) – Dimensionless Hubble parameter. If not supplied, read from
cosmo["h"].pi_min (float) – Minimum positive line-of-sight separation used when building the default grid.
pi_max (float) – Maximum positive line-of-sight separation used when building the default grid.
n_pi (int) – Number of positive grid points used when building the default grid.
z_interp_max (float | None) – Optional maximum redshift used for the distance-redshift interpolation.
n_z_interp (int) – Number of redshift points used for the interpolation.
- Returns:
Tuple containing the line-of-sight grid in
Mpc / hand the dimensionless lensing window evaluated on that grid.- Return type:
tuple[ndarray, ndarray]
- dsf.covariance.ingredients.geometry.lens_number_density_3d_from_angular_density(cosmo, *, n_lens_arcmin2, z_min, z_max, area_deg2, h=None)[source]¶
Return the three-dimensional lens number density for a redshift bin.
- Parameters:
cosmo (Cosmology) – CCL cosmology object.
n_lens_arcmin2 (float) – Angular number density of lenses in
arcmin^-2.z_min (float) – Lower lens-bin redshift edge.
z_max (float) – Upper lens-bin redshift edge.
area_deg2 (float) – Survey area in square degrees.
h (float | None) – Dimensionless Hubble parameter. If not supplied, read from
cosmo["h"].
- Returns:
Comoving lens number density in
(h / Mpc)^3.- Return type:
float
- dsf.covariance.ingredients.geometry.pi_limits_from_lens_edges(cosmo, *, z_min, z_max, z_center, h=None)[source]¶
Return line-of-sight limits relative to a central lens redshift.
- Parameters:
cosmo (Cosmology) – CCL cosmology object.
z_min (float) – Lower lens-bin redshift edge.
z_max (float) – Upper lens-bin redshift edge.
z_center (float) – Effective or central lens redshift.
h (float | None) – Dimensionless Hubble parameter. If not supplied, read from
cosmo["h"].
- Returns:
Lower and upper line-of-sight limits in
Mpc / h.- Return type:
tuple[float, float]
- dsf.covariance.ingredients.geometry.survey_volume_from_edges(cosmo, *, z_min, z_max, area_deg2, h=None)[source]¶
Return the comoving survey volume of a redshift shell.
- Parameters:
cosmo (Cosmology) – CCL cosmology object.
z_min (float) – Lower redshift edge.
z_max (float) – Upper redshift edge.
area_deg2 (float) – Survey area in square degrees.
h (float | None) – Dimensionless Hubble parameter. If not supplied, read from
cosmo["h"].
- Returns:
Comoving shell volume in
(Mpc / h)^3.- Return type:
float