rfplot: Add support for start and end dates#84
Conversation
Signed-off-by: Martin Herren (HB9FXX) <cq@hb9fxx.ch>
This function allows to get start bin number and number of integrations for a set of .bin files given start and end date/time strings. Signed-off-by: Martin Herren (HB9FXX) <cq@hb9fxx.ch>
Creation of test sets of 200 minutes of random 1024 S/s int16 IQ data is done automatically at first test run. Signed-off-by: Martin Herren (HB9FXX) <cq@hb9fxx.ch>
…time strings Using the new get_subs_from_datestrings() function in rfio. Signed-off-by: Martin Herren (HB9FXX) <cq@hb9fxx.ch>
ac224bd to
7d17fcd
Compare
|
I merged this because your tests worked, but I think I found an edge case where I provide no direct path. For example, this fails: but this works: I'm not too familiar with the C dir handling. Any suggestions on how to make it work when no path is given? |
Good catch, i'll look into it ! |
|
Works. Thanks for fixing! |
Done on PE0SAT's suggestion.
This is more convenient that to have to calculate the start bin and the number of iterations.
The first attempt was to only parse the header of the first bin and calculate the start bin. This worked fine in theory with perfect bins. Not with real bins with slight time drifts and frame drops.
A second attempt was to parse the header of all bins. This worked fine, ended up to be unusable slow on longer acquisitions.
Thus the current and third iterative attempt. It guesses the start bin by reading the header of the first bin, then iteratively reads the guessed bin's header and adjusts by doing a better guess. In practice it rarely needs more than 3 guesses. This makes it accurate and fast.
Instead of adding a test dataset for the unit tests, it generates the testdata on the first test run.