Closed astronomerritt closed 1 month ago
@Gerenjie can you test this out?
Attention: Patch coverage is 95.83333%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 80.89%. Comparing base (
6423254
) to head (9aae130
). Report is 3 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
src/sorcha/modules/PPOutput.py | 88.88% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
For Sorcha 1.1 -- could we consider allowing the extension, and also inferring the format from the extension?
It would avoid some of these problems (and also make it easier to shell-script Sorcha runs). Was this already considered & rejected because of some other side-effects?
@mjuric Never discussed because OIF did that. White space has lots of various extensions. I don't see it how it helps with the shell script... happy to discuss it on the next planned sorcha call
I think I should probably write a unit test to cover ephemeris files being written in different formats.
Also, should SQL-format ephemeris files also be indexed?
I think it might take way too long if its being indexed given the sheer amount of rows. It might be better as a utility script.
Good point.
Would strongly advise this isn't merged until a unit test is in, even if Jake finishes testing it first - I've just found (and fixed) a small bug I introduced when fixing the merge conflict. Writing the unit test now.
Unit tests would be good.... 😀
Unit tests are in. These tests check to make sure Sorcha can actually read in the ephemeris files it writes. Probably should have had these tests a while ago.
Updated the docs also, plus I edited the default/example config files to make it clearer that the eph_format keyword is used for reading in AND writing out ephemeris files.
Did a test running ephemeris generation and writing the file, then rerunning while loading in that ephemeris file. Numerically I'm getting a perfect match, but there are a couple of issues
Otherwise, performance looks good. I ran 1000 orbits through 1 year on baseline_v3.3 on a local linux machine. Runtime was ~2 min 30 sec with ephemeris generation, and ~10 sec reading in ephemeris.
I think this makes sense as the read in behavior is different than how ephemeris generation outputs stuff- Ephemeris generation takes everything in a chunk and figures out if it is in a pointing where as reading in the ephemeris we need to check that we've got everything in the input ephemeris file so have to read the whole thing multiple times since we can't assume that things are in order. We could do a sort but it adds complexity that doesn't seem needed.
Fixes #987.
Fixes #679.
-ew
flag is set, ephemeris output will save in the same format as Sorcha output, as specified by theeph_format
keyword in the[OUTPUT]
section of the config file.eph_format
config file variable also affects format of outputted ephemeris files. Removed an outdated reference to the temporary ephemeris file.NOTE 1: because the ephemeris output can now be saved in different formats, the file extension SHOULD NOT BE INCLUDED on the call to the command line:
-ew ephemeris_output
NOT:
-ew ephemeris_output.csv
NOTE 2: the format in which ephemeris output can be saved is controlled by the
eph_format
keyword in the config file. The only available options are thus csv, whitespace or hdf5.Review Checklist for Source Code Changes