Convergence tests between Rust and C++ implementations - #6
Conversation
Included modfiles and solutions for four different systems.
Fixed minor formatting error in pytest convergence section
|
Important Planning to add |
|
TODO:
|
|
TODO:
|
|
PTF1 J0823+0819, sdB + WD, P = 87.5 min (TESS, 786.5 nm) (ellipsoidal no eclipses) |
|
This is looking good! You'll want to remove the pycache folder from the list of commits. We'll want to create a doc with information about the objects used in the end-to-end tests vs cpp-lcurve at some point, but that will have to wait for the framework of some documentation, so maybe it's for another pull request |
…p_convergence.py accordingly/ Added small README.md for contributing I've changed the file structure such that modfiles and solutions of a single object are always lumped together, and separated into dictionaries named after the object. This allows us to use pytest.mark.parametrize to automate the tests a little better. I've also added a short destription of the directory and how to contribute to the testing suite. Removed __pycache__ directory because it was wrongly included in tracking due to blanket `git add`.
|
ah, yes ofc. The old blanket |
|
Alternatively we can do |
This only triggers the test to fail for me when I set Also, the unit tests fail because we don't have numpy as a dependency. I'd rather not include it in the dependencies if it is not used anywhere else, this stackoverflow thread shows how to handle this somewhat nicely. I can add this to the |
|
could you plot the two models against each other and also make a plot of (lc.total-cpp) / cpp? I wonder if there's something we're missing about what we're actually comparing in these tests |
|
Changed inputs to the legacy formats now, tests relative accuracy to |

I've added a basic implementation of
test_convergence_cpp.py, which tests convergence by loading a.modfile and a c++ solution and taking the difference between the c++ solution and the calculated Rust light curve. Difference is taken withpytest.approxto avoid floating point imprecision.