Repository navigation
Fix orbit-evection slow test after obliqua merge - #888
Conversation
The slow-tier test built its initial helpfile row without core_density, which get_C_planet reads, and its Hansen table spanned k in [-50, 200] while the m=0 mirror requests k down to -200. Add core_density to the row and build the table over [-200, 200]. Related: #859
The orbit-evection slow test failed in two places after the obliqua merge, #859: hf_row lacked core_density, so get_C_planet fell through to a config attribute the test namespace does not have (AttributeError at setup), and the Hansen table spanned k in [-50, 200] while the m=0 mirror requests k down to -200, which broke the array shapes in orbitals() (251 against 401 modes). Add an assertion in the fixture that the table range covers what kmin_kmax_for_m0_mirror requests, so widening the test spectrum without the table fails at setup. Replace the timing, peak eccentricity, capture time and angular momentum drift figures in the module docstring with values measured from the current run (628 s, e_peak=0.744 at a'=12.33 R_earth, drift -4.2%), and drop the claims that came from a standalone run that cannot be reproduced here. Correct the C_planet comment to the C_int key that get_C_planet writes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #888 +/- ##
=======================================
Coverage 94.24% 94.24%
=======================================
Files 118 118
Lines 18641 18641
Branches 3187 3187
=======================================
+ Hits 17568 17569 +1
+ Misses 1069 1068 -1
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@MarijnJ0 Please review, the recent Obliqua PR merge broke the nightly apparently, this should it get back on track. |
There was a problem hiding this comment.
These changes look good to me. Iverified the tests pass on my machine as well. The table span test is also a nice addition!
The discrepancy between the original pinned values and the new values arise due to a slight shift in the evection angle phase that arises due to the inclusing of the new (neglegible) m=0 modes. This does not affect the overall migration substantially. Since the pinned values are still in_band the semi major axis and eccentricity still undergo rapid oscillations, so a small change (due to additional m=0 terms) affects the specific moment during this oscillation that we observe at the end, and can give rise to the observed ~4% offset.
Overall, the structure now matches the correct orbit solver structure in PROTEUS/orbit.
Thanks for catching this Tim!
|
Thanks a lot! :) |
Description
The orbit-evection slow-tier test errored at setup after the obliqua merge, #859. Two problems surfaced together: the test helpfile row did not set
core_density, soget_C_planetfell through to a config attribute the test namespace does not have (AttributeError at setup), and the Hansen table spanned k in [-50, 200] while the m=0 mirror requests k down to -200, which mismatched the array shapes inorbitals()(251 against 401 modes).This adds
core_densityto the row, builds the table over [-200, 200], guards the table range against what the mirror requests, and refreshes the module docstring figures to values measured from the current run. Related: #859.Validation of changes
pytest tests/integration/test_slow_orbit_evection_ctl.pyon the branch tip: 4 passed in 629 s. macOS, Python 3.12.kmin_kmax_for_m0_mirror; it evaluates False for the old [-50, 200] table and True for [-200, 200].plan_sat_amdrift -4.2%), stated as one run on one machine. No test assertion changed.Checklist