sp_validation.dashboard.correlations¶
Position–shear and scale-dependent leakage products for the dashboard.
One catalogue pass builds the TreeCorr catalogues once and runs the catalogue-paper correlation tests, all on the same k-means jackknife patches (computed once from the galaxy positions and saved):
starsGalaxy γ_t, γ_× around PSF validation stars (valid HSM, one entry per star after merging per-exposure detections within
--dedup-arcsec), for all stars and in star-magnitude tertiles. No random subtraction.lambdaPSF-model ellipticity (λ₁) and star-minus-model residual (λ₃) of the PSF validation stars, tangential and cross, around galaxy positions (a random subsample of
--lens-fraction), minus the same around footprint randoms.tilesGalaxy γ_t, γ_× around the centres of the tiles in the catalogue.
gaiaGalaxy γ_t, γ_× around Gaia DR3 stars (G < 20, RUWE < 1.4) inside the footprint, in G bins, minus the same around footprint randoms.
alphaScale-dependent leakage α(θ) = τ₀(θ)/ρ₀(θ) for all galaxies and in galaxy-magnitude tertiles; ρ₀ from the PSF model at the stars, τ₀ the galaxy–PSF-model correlation, both as in
sp_validation.rho_tau.
Galaxy shapes are the calibrated e1, e2 with w_des; in the α
magnitude bins they are rescaled to the bin’s own shear response. Each
measurement writes <name>_<version>.npz with θ, the correlations, their
jackknife errors and joint covariance, pair counts and a JSON provenance.
Usage (inside the container):
python -m sp_validation.dashboard.correlations \
--catalogue-dir run-r425/catalogue --version SP_v2.0.0 \
--out-dir catpaper/products --gaia gaia_dr3_G20_ruwe1p4_unions20k.fits
- merge_detections(ra, dec, radius_arcsec)[source]¶
Group detections closer than
radius_arcsec(friends of friends).Returns the group label of each detection and the number of groups.
- unique_stars(stars, radius_arcsec)[source]¶
One position and magnitude per star from its per-exposure detections.
- read_galaxies(path, region, chunk=5000000)[source]¶
Galaxy columns (float64) and the set of tile IDs, streamed in chunks.
- footprint_randoms(n, nside, pixels, region, rng, depth=6)[source]¶
Points uniform over the footprint pixels, to 1/2**depth of a pixel.
- save(out, name, version, results, provenance)[source]¶
Write one measurement:
resultsmaps a label to ameasuredict.
- quantile_edges(values, n)[source]¶
Edges of
nequal-count bins; the last edge just above the maximum.