Propagate fitted non-gravitational parameters in predict - #524
Merged
Conversation
Closes #522. predict and residuals_at_state built their simulations from the fitted state but never enabled ASSIST's Marsden non-gravitational force, so both propagated gravity-only even when the fit had solved for A1/A2/A3. parse_fit_result compounded it by dropping the amplitudes at the Python boundary, so the values never reached the C++ at all. The predicted position, and the uncertainty ellipse mapped about it, were therefore wrong for any non-gravitationally fitted object, silently. Three changes. parse_fit_result now carries a1/a2/a3 and reconstructs nongrav_mask from which columns the result row has, since those columns exist only when a non-gravitational fit ran. predict.cpp gains apply_nongrav_from_fit(), applied at both sites that build a simulation, using the same default g(r) as the fit. residuals_at_state passes the mask and amplitudes through to compute_residuals, which already accepted them. Verified on (152563) 1992 BF, 644 optical observations over 71 years fitted with A2: the chi-square implied by residuals_at_state went from 4779.9 against a reported 665.5 to matching it exactly, and the residuals on the four 1953 precovery plates fell from about 15 arcsec to about 2 -- consistent with Vokrouhlicky, Chesley and Matson (2008), who corrected those positions by up to 3.1 arcsec. The new test asserts residual size rather than chi-square, since the noise-free synthetic arc drives chi-square to zero and a relative comparison against it is degenerate. Both new tests fail with either half of the fix reverted.
…cceleration The prediction entry described integrate-once/interpolate-to-many but was silent on non-gravs, which until #522 it did not in fact propagate.
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.
Fixes #522.
predictre-integrated a fitted orbit under gravity alone, discarding any A1/A2/A3 the fit had solved for. For a comet, or an asteroid with a detected Yarkovsky acceleration, the prediction drifted away from the orbit that produced it.Two halves were missing.
predict.cppnever enabledASSIST_FORCE_NON_GRAVITATIONALor setparticle_params, andparse_fit_resultdropped thea1/a2/a3columns on the way from the fit table back into aFitResult— so fixing either one alone leaves the bug in place.residuals_at_statenow passes the parameters through as well.Verified on 152563 (1992 BF), whose A2 is well determined over a 1953–2016 arc: residuals at the fitted state drop from 15" to 2" in 1953, and the predicted-to-fitted agreement is 1.000 for both gravity-only and A2 fits. Two regression tests, each confirmed to fail when either half of the fix is reverted.