Add Normalized Innovation Squared (NIS) Chi-Squared test + OD dashboard#533
Add Normalized Innovation Squared (NIS) Chi-Squared test + OD dashboard#533ChristopherRabotin merged 2 commits intomasterfrom
Conversation
The SNC is also now correctly disabled when the delta_t is greater than the disable time. Exports the whitened residuals, dimensionless quantity. Closes #128
|
Visit the preview URL for this PR (updated for commit 8d22421): https://nyx-rustdoc--pr533-feat-nis-chi-square-s3ahr3fy.web.app (expires Sat, 09 May 2026 15:23:12 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: d8e2a55934352d850c15d11866c39eb2d2e029be |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces whitened residuals and Normalized Innovation Squared (NIS) consistency tests to the orbit determination process. Key changes include updating the Residual struct to store whitened innovations, implementing a Chi-squared test for filter consistency, and enhancing Parquet export/import logic to include these new metrics. Additionally, the PR significantly upgrades plotting utilities to support comprehensive residual analysis, including QQ plots and autocorrelation. Feedback focuses on resolving a naming mismatch between export and import logic for whitened residuals, correcting a bug in the degrees of freedom calculation for the NIS test, and improving the robustness of statistical calculations by leveraging existing library functions.
There was a problem hiding this comment.
Code Review
This pull request introduces whitened residuals to the orbit determination process, enabling more advanced statistical validation including a Chi-squared test for Normalized Innovation Squared (NIS) consistency. It also significantly enhances the residual plotting utilities with QQ plots and autocorrelation analysis, updates example configurations, and improves progress logging. The review feedback correctly identifies a logic error in the NIS consistency test regarding the calculation of degrees of freedom when measurements are rejected. It also points out an inconsistency in the export naming convention for whitened residuals that would break the import functionality, providing suggestions to align it with existing residual types.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #533 +/- ##
==========================================
- Coverage 78.17% 78.02% -0.16%
==========================================
Files 102 102
Lines 16031 16098 +67
==========================================
+ Hits 12532 12560 +28
- Misses 3499 3538 +39 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Add Normalized Innovation Squared (NIS) Chi-Squared test; summarize a whole OD run into a single dashboard showing the whitened residual ratios by status (accepted/rejected) and by tracker, the auto-correlation by tracker with the sigmas, the histogram of these whitened residuals, and the QQ plot of these whitened residuals. In "ScalarOD", there will only ever be a single whitened residual: it scales with the dimension of the simultaneously processed measurements.
The SNC is also now correctly disabled when the delta_t is greater than the disable time. Exports the whitened residuals, dimensionless quantity.
Closes #128
Architectural Changes
No change
New Features
Improvements
Bug Fixes
Testing and validation
Ran the 06 example a bunch of times with various inputs.
Documentation
This PR does not primarily deal with documentation changes.