Update scale-dependent and objectwise leakage computations to tomography - #307
Merged
cailmdaley merged 12 commits intoOct 2, 2026
Conversation
…u-stats and plot tomography
…tomography' into tomo307-work
_get_alpha_leakage and _compute_scale_dependent_xi_psf_sys draw from np.random.default_rng(seed) (seed=0 by default) instead of the global unseeded state, so the plotted error bars are reproducible run to run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JmsgTjEULk4a3t5rppLpbZ
For a == b, xi_psf_sys = tau^2 / rho is one measurement squared; drawing two independent tau samples underestimated the tau contribution to the error by sqrt(2). The callback passes same_bin to the helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JmsgTjEULk4a3t5rppLpbZ
The tau variances are saved while each bin's table is loaded, so bin a's draw uses bin a's variance and bin b's uses bin b's, for + and -. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JmsgTjEULk4a3t5rppLpbZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JmsgTjEULk4a3t5rppLpbZ
…from rho/tau plot_objectwise_leakage(tomography=False, cov_type=None) compares the object-wise <a_ii> of each version and tomographic bin with the scale-dependent alpha(theta) = tau_0 / rho_0, summarised as alpha_mean (inverse-variance weighted mean and std), alpha_1 (smallest theta) and alpha_0 (intercept of a weighted affine fit). calculate_alpha_leakage_summaries stores them in leakage_coeff[ver]["tomo_bin_<id>"]; _load_alpha_leakage is shared with plot_scale_dependent_alpha. Marker is the version, colour the version (non-tomographic) or the bin. A version missing a catalogue column is dropped cleanly from the bin loop. The galaxy mask reads HDU 1, the table LeakageObject.read_data selects rows from. cv_objectwise_leakage takes the rho/tau products as inputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JmsgTjEULk4a3t5rppLpbZ
xi_psf_sys: central value, auto-pair error 2|tau|sigma/rho from one tau draw, cross-pair error from both bins' variances, seed reproducibility. alpha: central value tau/rho and reproducibility. Summaries recover the affine intercept. Smoke test: object-wise regression per bin (real shear_psf_leakage) and the comparison plot, with alpha(theta) stubbed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JmsgTjEULk4a3t5rppLpbZ
…pped Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JmsgTjEULk4a3t5rppLpbZ
…n and per-bin suffix) Re-locking also brings the lock in line with this branch's pyproject (glass 2026.2 and the OneCovariance dependencies). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JmsgTjEULk4a3t5rppLpbZ
cailmdaley
merged commit Oct 2, 2026
476ae55
into
feature/sp_validation-extend-to-tomography
1 check failed
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.
PR related to #299 .
This PR should contain:
Finished for merge (step 2b of #375)
plot_objectwise_leakage(tomography=False)plots ⟨a_ii⟩ against α(θ) per bin. α(θ) comes from the ρ/τ products as τ₀/ρ₀ and is summarised as the weighted mean, the value at the smallest θ, and the affine intercept. That intercept uses absolute σ, with no χ² rescaling. Deriving α from ρ/τ differs numerically from the old star-catalogue estimator; we accept that.test_psf_leakage.pycovers the error propagation, the α summaries, the per-bin object-wise regression and plot on synthetic data, and version skipping. It passes in the container: 8 passed.cv_objectwise_leakagerule's ρ/τ inputs. They depend on the workflow's_tomo_bin_allfilenames, which Merge develop into the tomography branch #374 aligns.— Claude on behalf of Cail