sp_validation.dashboard.field_maps

Catalogue-level products behind the dashboard sky maps and weight figure.

Two cached products, each computed once from the calibrated catalogue and read by the renderers in sp_validation.dashboard:

field_maps_<version>.npz

Per-pixel sums on a nested HEALPix grid: galaxy counts and weight sums, weighted ellipticity and ellipticity-squared sums, and the PSF model (ellipticity, FWHM) at the galaxy positions; plus star counts and the star-minus-PSF-model residual sums. Means, dispersions and effective densities are ratios of these sums, so a renderer can coarsen the grid by summing children before dividing. Only occupied pixels are stored.

weight_cells_<version>.npz

The galaxy weight on the SNR x size-ratio grid it is built on (sp_validation.calibration.get_w_des()): per-cell counts and the weight range within each cell, the grid edges, and the distinct weight values with their multiplicities. Also contains response histograms, equal-count leakage-cell regression sums and binned additive-bias sums. Quantile boundaries use a temporary float32 buffer of the seven leakage inputs; only sufficient statistics are saved.

star_residuals_<version>.npz

Histograms and full-sample moments of valid-HSM star residuals.

Usage (inside the container):

python -m sp_validation.dashboard.field_maps \
    --galaxies shape_catalog_cut_ngmix.fits --stars stars.hdf5 \
    --version SP_v2.0.0 --out-dir cosmo_val/
weight_grid_edges(n_bins, snr_range, size_ratio_range)[source]

Log-spaced SNR and size-ratio edges of the weight grid.

weight_cell_index(values, edges)[source]

Cell index of each value, matching calibration.cut_to_bins.

Bins are right-closed, (edge[i], edge[i+1]]; a value outside the edges belongs to the last cell, as cut_to_bins assigns it.

_accumulate(total, pixels, weights, npix)[source]
leakage_cells(data, n_bins=8)[source]

Equal-count resolution bins, then equal-count SNR within each bin.

galaxy_products(path, nside, n_bins, snr_range, size_ratio_range, chunk)[source]

Stream the galaxy catalogue once into map sums and weight-cell tallies.

star_sums(path, nside)[source]

Star counts and star-minus-PSF-model residual sums per pixel.

main(argv=None)[source]