Repository navigation
Conversation
The planet-by-sample comparison of semi-major axes returns a body index for every matching sample. Iterating those indices repeats the same perturbation across the whole batch and also crosses samples with different orbital ordering. Select each affected body once and mask its correction for each sample. Scalar orbit calculations are unchanged. Related to sblunt#392.
This branch has not been deployed
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.
For multi-planet fits with
fit_secondary_mass=True, batching identical parameter vectors changes the predicted astrometry and likelihood:Before:
-23.46248for the scalar and[-32.23987, -32.23987, -32.23987]for the batch. After: all are-23.46248(rounded).np.whereon the planet-by-sample ordering mask returns the same body index once per matching sample. Select each affected body once, then apply its correction only to samples where that companion is interior. Deduplicating alone still gives incorrect results when orbital ordering varies within the batch.Regressions cover two/three companions, identical/mixed/equal semimajor axes, and singleton/three-sample batches. Native checks on Python 3.10 and 3.12 compare the bundled astrometry with separately assembled scalar Kepler predictions and Gaussian likelihoods, including HDF5 roundtrips. All working controls and scalar predictions stay exact; a clean native wheel reproduces the results. The change composes with #451 and preserves its checkpoint workloads.
Related to #392; this fixes the multi-planet astrometric batch case, without claiming every configuration in that report is resolved. #426's relative-RV fix still reproduces this separate error.
@sblunt @semaphoreP, could you review this change?