Gravitational-Wave Observables¶
Gravitational-wave (GW) tracers describe the radial windows used for angular
GW number counts and weak lensing. They live in cloelib.observables.gw and
implement the cloelib.observables.photo.tracer.Tracer protocol consumed by
AngularTwoPoint.
Protocol Definition: cloelib.observables.photo.tracer.Tracer
Required Properties¶
Like the photometric tracers, both GW tracers provide:
perturbations: Perturbations object used for the matter power spectrum and background quantitiesn_z_bins: Number of tomographic redshift binsz: Redshift grid used for the Limber integralprefact_toggle: Standard Tracer field-response toggle; it is0for both GW tracers because neither is a spin-2 shear field
Required Methods¶
get_window(z)¶
Compute the radial window on a redshift grid. The result has shape
(n_bins, n_z).
GW-Specific Angular Response¶
GW tracers also define gw_prefact_toggle. It is 1 for
GWWeakLensingTracer, which requires the scalar-convergence response
\(\ell(\ell+1)/(\ell+1/2)^2\), and 0 for GWNumberCountsTracer.
This GW-specific attribute remains outside the shared Tracer protocol, so
existing tracer implementations remain compatible. AngularTwoPoint treats a
missing gw_prefact_toggle as 0.
Both tracers require an evenly spaced, strictly increasing redshift grid that
does not contain zero. The normalized source distribution must have shape
(n_bins, n_z), with its last dimension matching the redshift grid. Shift and
width nuisance parameters use one-based bin numbers, such as dz_gw_1 and
width_gw_1.
Shared Example Setup¶
The examples below use one source bin and a linear CAMB matter power spectrum.
Install cloelib with its camb extra, then run the blocks in order.
import numpy as np
from cloelib.cosmology.camb_cosmology import (
CAMBBackground,
CAMBLinearPerturbations,
)
z = np.linspace(0.01, 3.0, 101)
background = CAMBBackground(
H0=67.5,
Omega_b0=0.049,
Omega_cdm0=0.265,
Omega_k0=0.0,
As=2.1e-9,
ns=0.965,
mnu=0.06,
w0=-1.0,
wa=0.0,
gamma_MG=0.545,
N_mnu=1,
)
perturbations = CAMBLinearPerturbations(background, redshifts=z)
gw_dndz = np.exp(-0.5 * ((z - 1.0) / 0.25) ** 2)[None, :]
gw_dndz /= np.trapezoid(gw_dndz, z, axis=1)[:, None]
gw_nuisance = {
"b1_gw_bin0": 1.5,
"dz_gw_1": 0.0,
"width_gw_1": 1.0,
}
Existing Tracer Implementations¶
GWNumberCountsTracer¶
GWNumberCountsTracer represents angular fluctuations in the number density
of GW sources.
Location: cloelib/observables/gw/number_counts.py
What it does:
- Computes the source-density window \(W_i^{\mathrm{GWNC}}(z)\)
- Applies a GW source-bias model
- Applies redshift-distribution shift and width nuisance parameters
- Behaves as a scalar field in angular power spectra
Its radial window is
The supported gw_bias_model values are:
per_bin: one constant per bin, read from zero-based keys such asb1_gw_bin0per_bin_int: the per-bin values interpolated between the redshifts where the source distributions peakpoly: a cubic function with coefficientsb1_gw_poly0throughb1_gw_poly3
Missing bias parameters default to 1.0. Shift and width parameters are
required for every bin.
Example:
from cloelib.observables.gw import GWNumberCountsTracer
gw_number_counts = GWNumberCountsTracer(
perturbations=perturbations,
dndz=gw_dndz,
z=z,
gw_bias_model="per_bin",
nuisance_params=gw_nuisance,
)
number_count_window = gw_number_counts.get_window(z)
assert number_count_window.shape == (1, len(z))
GWWeakLensingTracer¶
GWWeakLensingTracer represents weak-lensing convergence inferred from GW
sources.
Location: cloelib/observables/gw/weak_lensing.py
What it does:
- Computes the GW lensing-efficiency and convergence windows
- Applies redshift-distribution shift and width nuisance parameters
- Uses the scalar-convergence angular response
- Excludes galaxy intrinsic alignment, magnification bias, and multiplicative shear bias
Its radial window is
AngularTwoPoint applies the scalar-convergence response
\(\ell(\ell+1)/(\ell+1/2)^2\) when forming a power spectrum.
Example:
from cloelib.observables.gw import GWWeakLensingTracer
gw_weak_lensing = GWWeakLensingTracer(
perturbations=perturbations,
dndz=gw_dndz,
z=z,
nuisance_params=gw_nuisance,
)
lensing_window = gw_weak_lensing.get_window(z)
assert lensing_window.shape == (1, len(z))
Use these tracers with AngularTwoPoint as shown in the
GW summary-statistics example.
Next Steps¶
- Gravitational-Wave Summary Statistics – Compute angular power spectra
- Tracer Extension Guide – Implement another
Tracer - Photometric Observables – Review the photometric tracer implementations
- API Reference – Full class and method details
- Back to Observables – Review all observable interfaces