Add reduced-chi2, KL, and whitened-signal density diagnostic plots#103
Merged
Conversation
- plot_chi2_distributions / make_chi2_distribution_plot: per-band lg(reduced chi2) distributions of full light curves, before and after the model uncertainty correction, against the calibrated degrees-of-freedom mixture over the light-curve length distribution. - plot_kl_distributions / make_kl_distribution_plot: per-band lg(KL) distributions of the per-light-curve KLWhitenLc statistic against a Monte-Carlo calibrated reference. - plot_whiten_density / plot_addmagerr_density: per-band heatmaps of the whitened signal and added magnitude error vs object magnitude. - scripts/plot_reduced_chi2.py and scripts/plot_kl.py: CLI drivers that apply a trained model and render the figures.
hombit
enabled auto-merge
July 20, 2026 14:14
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #103 +/- ##
==========================================
- Coverage 63.18% 53.22% -9.96%
==========================================
Files 32 32
Lines 1654 2018 +364
==========================================
+ Hits 1045 1074 +29
- Misses 609 944 +335 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
Adds per-band diagnostic plots that compare a survey's reported vs. model-corrected photometric uncertainties, in the same style as the existing whitened-signal plots.
plot_chi2_distributions/make_chi2_distribution_plot: per-bandlg(reduced χ²)distribution of full light curves, before and after correction, against a calibrated reference (theχ²_{N-1}/(N-1)mixture over the empirical light-curve-length distribution).plot_kl_distributions/make_kl_distribution_plot: per-bandlg(KL)of the per-light-curveKLWhitenLcstatistic½(μ² + σ² − ln σ² − 1), against a Monte-Carlo calibrated reference.plot_whiten_density/plot_addmagerr_density:P(z | mag)andP(Δm | mag)per band (2D companions to the whitened-signal histograms).scripts/plot_reduced_chi2.py,scripts/plot_kl.py: load a trained model, reconstruct its input columns, and render the figures.Notes
Σ_j z_j²/(N−1); no whitening matrix is built.plot_whiten_distributions(uncorrected = filled, corrected = line; colorblind-safetableau-colorblind10).