Correctly infer length of record when unspecified#323
Merged
tompollard merged 4 commits intomasterfrom Sep 10, 2021
Merged
Conversation
added 4 commits
August 17, 2021 11:05
If the header file does not specify the record length, it must be inferred from the size of the signal file (dividing the data length by the number of samples per frame.) Previously, this calculation assumed that tsamps_per_frame == n_sig, which is not necessarily the case. Correctly calculate the total spf for the first signal file and use that as the divisor, rather than the number of signals. Rename the "n_sig" parameter of _infer_sig_len to tsamps_per_frame accordingly.
If the header file does not specify the signal length, rdrecord should calculate it from the size of the signal file. Test that this works correctly for multi-frequency records.
If the header file does not specify the record length, it must be inferred from the size of the signal file (dividing the data length by the number of samples per frame.) Previously, this calculation assumed that the file did not contain a prolog. Correctly calculate the data length by subtracting the prolog length (byte offset) from the size of the file.
If the header file does not specify the signal length, rdrecord should calculate it from the size of the signal file. Test that this works correctly for a signal file with a prolog.
Member
|
Thanks @bemoody, looks good to me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the header file does not specify the signal length,
rdrecordtries to determine it based on the length of the first signal file.This calculation was wrong when the signal file contained a prolog, or any signal contained multiple samples per frame.