Skip to content

Preserve selected orbit roots during chained propagation - #144

Merged
SuperdoerTrav merged 1 commit into
llnl:mainfrom
sylvesterkaczmarek:fix/orbit-propagation-context-selection
Sep 19, 2026
Merged

SuperdoerTrav merged 1 commit into
llnl:mainfrom
sylvesterkaczmarek:fix/orbit-propagation-context-selection

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Selecting from a vector returned by Orbit.at() leaves _propagation_root pointing to the full original vector. Calling .at() on the selected orbit then returns the whole collection. Reordering the vector also silently restores the original orbit order on the next propagation.

Apply the same selection to vector propagation roots in __getitem__ and __next__. Keep scalar roots unchanged when selecting time samples of a single orbit.

Regression tests cover integer and negative indexing, slices, reordering, boolean masks, iteration, and scalar-root time samples with Keplerian and RK4 propagators. Reproduced on current main at 6af6000.

Validation on Python 3.12:

  • New regression tests before the fix: 16 failed, 2 passed. After the fix: all 18 passed.
  • python -m pytest -q -n 2 --tb=short: 324 passed, 2 skipped, 35 subtests passed.
  • New test module passes Flake8. No additional Flake8 diagnostics in orbit.py compared with the base revision.
  • Syntax checks and git diff --check passed.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.39%. Comparing base (6af6000) to head (f78960a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #144      +/-   ##
==========================================
+ Coverage   97.32%   97.39%   +0.07%     
==========================================
  Files          17       17              
  Lines        5895     5897       +2     
==========================================
+ Hits         5737     5743       +6     
+ Misses        158      154       -4     
Flag Coverage Δ
unittests 97.39% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
ssapy/orbit.py 98.83% <100.00%> (+0.43%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sylvesterkaczmarek
sylvesterkaczmarek marked this pull request as ready for review September 19, 2026 08:46
@SuperdoerTrav
SuperdoerTrav merged commit 626e5dc into llnl:main Sep 19, 2026
5 checks passed
@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Thanks for merging this as well. I really appreciate the continued review, and I’m glad to keep contributing to SSAPy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants