Repository navigation
cosmo_val dashboard: the catalogue paper's validation figures for v2 - #434
Draft
cailmdaley wants to merge 30 commits into
Draft
cailmdaley wants to merge 30 commits into
cailmdaley wants to merge 30 commits into
Conversation
Streams the #425 cut catalogue and stars.hdf5 once, builds k-means jackknife patches, and measures galaxy shear around PSF stars (merged across exposures), tile centres and Gaia stars, the PSF field around galaxies (lambda_1, lambda_3, random-subtracted) and alpha(theta) in galaxy-magnitude bins. stage_gaia.py stages Gaia DR3 over the UNIONS tiles from a login node by source_id HEALPix ranges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9EMizpnZRRK8cFCVBK
tangential.py draws galaxy shear around PSF stars, tile centres and Gaia stars, the PSF field around galaxies, and alpha = tau0/rho0 in galaxy magnitude tertiles, each panel quoting chi2/nu against zero from the Hartlap-corrected jackknife covariance. render.py registers them (new 'Tangential shear tests' section; alpha in PSF leakage) when --correlations-dir holds the products. Gaia staging caches chunks and splits queries that time out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9EMizpnZRRK8cFCVBK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9EMizpnZRRK8cFCVBK
…che on success Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9EMizpnZRRK8cFCVBK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9EMizpnZRRK8cFCVBK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9EMizpnZRRK8cFCVBK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9EMizpnZRRK8cFCVBK
…correlations memory Subtracts the survey-mean PSF and residual ellipticity before the lambda correlations, as TauStat does for galaxies. Reused jackknife patches are rebuilt when the galaxy count changes. The correlations job requests 128G. The alpha-by-magnitude caption states the global selection response. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9EMizpnZRRK8cFCVBK
…only The config-space scale-cut figure now matches Paper II's: pure ξ+B, pure ξ−B and a COSEBIs B_n (n ≤ 6) heatmap over every reporting-bin cut, from a new cosebis_grid product computed off the run's integration ξ± and covariance (build_dashboard.sh submits it alongside the other products). The harmonic figure is the single Cℓ BB heatmap, as in the paper. The Cℓ data-vector figure draws EE alone; BB and EB are with the B modes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9GepCh7jeFUzLzH2ce
…onverge Log-COSEBIs filters of mode n do not depend on the requested mode count (checked bit-identical at 12'-83' and 1'-250'), so narrow cuts whose 20-mode roots fail still get their n <= 6 PTE. Fills the 18 holes on the full-area run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9GepCh7jeFUzLzH2ce
Matches the integration fix e480521 so the launched-checkout regression test passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9GhUCHD92bXVznvHP4
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #433. This adds the UNIONS catalogue paper's validation figures to the cosmo_val dashboard for the v2 catalogue. It is stacked on
feat/cosmo-val-dashboard-figures.Every figure below is rendered from #425's products: 10,094 tiles, 73.0M galaxies in the cut catalogue. All are systematics tests, so none emits ξ±, Cℓ or κ.
What's new
Code
field_maps.pyis extended andselection_hist.pyadded. One streamed pass over the cut catalogue and stars produces sufficient statistics for the SNR × size grid, star residuals, the r-magnitude map, α cells and bias regressions. A second pass over the comprehensive catalogue produces the magnitude histograms by selection stage.position_shear.py(the TreeCorr NG estimator, with jackknife covariance and random subtraction) andcorrelations.py(the builder).object_bias.py,selection_hist.pyandtangential.py, plus new functions inpsf.py,sky.pyandweights.py. All are pure(products, path) -> PNGand registered inrender.py, which gains a--correlations-dirflag.scripts/dashboard/build_dashboard.sh CATALOGUE_DIR RUN_DIR VERSION OUT_DIR [--gaia F] [--after JOBID]submits both builders in parallel and a render job that depends on them.--afterchains it on a catalogue extraction.gaia.dr3litebyscripts/dashboard/stage_gaia.py. ESA's archive caps anonymous queries at 50k rows.shapepipe_v2.yamldocuments the star columns the code reads.Choices
ACCEPTEDmarks whether PSFEx used a star in its fit, so it isn't a reserve flag.w_des, and no object-wise leakage correction, since raw E is v2's reference (Object-wise PSF-leakage correction zeros the same-object slope, not angular leakage; on v2 it raises τ0 by 52% #428).Inventory of the paper's 32 figure files
Figures and readings
SNR × size grid. Most galaxies sit at low SNR. The response rises from about 0.3 at SNR 10 to about 0.9, and shape noise is lowest for bright, small galaxies.

Galaxy response. R11 and R22 overlap and peak near 0.85; R12 and R21 peak at 0. Stars are omitted because v2 has no metacal star shapes.

Residual star properties. The ellipticity and fourth-moment residuals are centred on zero. The size residual is √(T⋆/T_PSF) − 1 = −0.3%: the PSF model is slightly too large.

Star density and size residual. Density rises toward the galactic plane. The size-residual map is mostly negative (median −0.58% in T) and has a positive south-west edge feature.

PSF FWHM and mean r magnitude. Mean galaxy magnitude anticorrelates with seeing, as the paper found for v1.

Selection stages. The final stage reproduces the cut catalogue's 73,023,642 rows. The v1 chip-defect, halo and pointing-count stages have no v2 cut and are omitted.

Object-wise α in 8×8 equal-count cells. α is about +0.03 for larger galaxies at SNR 20–40 and about −0.03 for the smallest; hatching marks |α| < 2σ.

α(θ) = τ₀/ρ₀ in magnitude tertiles.
ξ_sys from the α–β–η model vs α only. The full model sits about 5× above τ₀²/ρ₀ at large θ and about 1000× at 1′, so v2's PSF systematic is dominated by the PSF-model-error term (β), not by leakage.

Additive-bias regressions, per 1σ of each property. Every trend is below 3.5×10⁻⁴ in e. The r-magnitude trend, about −3×10⁻⁴ in both components, is the largest at 5–8σ by fit errors that ignore spatially correlated noise.

Galaxies around 4.77M PSF stars. γ_t is slightly negative from 3′ to 30′ (about −1×10⁻⁵, χ²/ν = 1.45). This is the paper's radial excess again, weaker. γ_× is null.

PSF stars around galaxies (λ), source ellipticities mean-subtracted. The star − model residual is null (χ²/ν = 1.22 and 0.86). The PSF model has a small tangential signal (χ²/ν = 2.0). Its cross component is non-zero (χ²/ν = 10.3): a smooth trough of about −6×10⁻⁵ peaking near 20′, the tile and CCD scale.
Review checked whether this is a convention bug. It isn't: flipping g₂ doesn't remove it, and galaxy and star frames agree through τ₀ and the α₁/α₂ cells. A focal-plane-locked PSF pattern is the plausible source. It doesn't reach the shear, since λ₃ is null.

Galaxies around tile centres. Null (χ²/ν = 0.81 and 1.03).

Galaxies around 7.23M Gaia stars. Null in all three G bins, with randoms subtracted. χ²/ν of 0.3–1.1 suggests the jackknife errors are on the large side.

Review
An Opus code review found no estimator error that changes a conclusion. Its two numeric points are addressed above: λ now subtracts the mean ellipticity (it previously included the survey-mean PSF ellipticity), and the per-bin selection response is stated. Also fixed: reused jackknife patches are rebuilt when the catalogue grows, and the correlations job requests 128G at 20k tiles.
Testing
sp_validation-ddd58fe0.sif): 572 passed, plus the schema test fixed on top. Ruff is clean.build_dashboard.shwas dry-run against a stubsbatchto check the job graph.Claude Opus 5.5 on behalf of Cail Daley
🤖 Generated with Claude Code