Report the chi-square on fits that were rejected rather than accepted - #519
Merged
Conversation
csq was written only when flag == 0, so a fit that converged and was then rejected reported NaN -- discarding the number that explains the rejection exactly when it is wanted. The stage markers hid it too: do_fit returns the lowest-chi-square candidate it tried, so a fit labelled 3 or 4 still carries a meaningful score. csq is now reported for every flag except -1 (never attempted) and 5 (no candidate found to score). The state, covariance and epoch stay gated on flag == 0, so a finite csq on a rejected row cannot be read as an accepted orbit. On the ten main-belt objects a cold start cannot fit -- all flag 3 or 4, all previously NaN -- the chi-squares separate into two groups: four with reduced chi-square 22 to 2652, and six between 5e7 and 2e10. Closes #518
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.
csqis now written for every flag except -1 (never attempted) and 5 (nocandidate found to score). The state, covariance and epoch stay gated on
flag == 0, so a finite chi-square on a rejected row cannot be read as anaccepted orbit.
This makes the stage markers diagnosable. On ten main-belt objects a cold start
cannot fit -- all flag 3 or 4, all previously NaN -- the chi-squares separate
into two groups the flags could not distinguish: four between 22 and 2652, and
six between 5e7 and 2e10. The first group is a weighting or outlier problem on a
good orbit; the second is a wrong orbit.
Closes #518.