Mtot as primary, not Msun - #453
Conversation
updated the code, the tests and used the linter I think the linter removed a blank line in test_layup_configs.py
|
Hi @awilson110, this looks good. I think this should work. |
matthewholman
left a comment
There was a problem hiding this comment.
Correct fix for #447 — rebound.Particle(m=Mtot) is the barycenter at the origin, so the reported elements are now genuinely barycentric (μ = GM_total, position relative to the SSB), and the demo_comet_expected.csv fixtures are regenerated to match.
One thing worth confirming: the pure-REBOUND fallback (include_assist=False, previously sim.particles[0]) now also uses the origin+Mtot primary. That's right as long as simulation_convert_to_rebound leaves the sim in the SSB frame — but that branch only fires for comets past the ASSIST timeframe, so the fixtures probably don't exercise it. A quick check would close it.
Minor: tests/layup/test_layup_configs.py drops one line near the top — intentional, or a stray edit?
@hannorein would you be able to confirm that the function
That was a mistake, I can remove it if needed |
|
Yes, |
Fixes #447 .
Replaced the primary to be Mtot instead of Msun
Review Checklist for Source Code Changes