Merged
Conversation
This was done programmatically using python. Files with a range that fell outside of [-128,127], but which would fit into that range, were offset by the noted amount to ensure the file woul now fit within range [-128,127]. This allows the trace files to be converted to one-byte-per-sample binary format, for example. offset | filename -----|----- `-14` | `lf_Q5_mod-manchester.pm3` `-14` | `lf_Q5_mod-nrz.pm3` `-10` | `lf_Q5_mod-fsk1.pm3` `-15` | `lf_Q5_mod-biphase.pm3` `-9` | `lf_Q5_mod-fsk2.pm3`
This was done programmatically using python. The `lf_Keri.pm3` was in range `[-508 .. 491]` (1000 value range). Each value was divided by four, cast to integer, and then adjusted by +1 (to center the values). The data plot in the pm3 client now shows discernible changes in amplitude. The resulting samples are all within range [-128,127]. This final fix allows ALL sample `.pm3` traces to be converted to one-byte-per-sample binary format.
|
You are welcome to add an entry to the CHANGELOG.md as well |
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.
Some of the
.pm3sample traces failed to cleanly convert to one-byte-per-sample binary files.For five of the files, the values spanned 256 values, but were not in the range
[-128 .. 127]. These files were read, and each sample was offset by the corresponding amount.For the file
lf_Keri.pm3, the samples were in the range[-508 .. 491](1000 value range). For this file, each sample was divided by four and then adjusted by +1 (to center the values). The data plot in the pm3 client now shows discernible changes in amplitude.With this PR, all the
.pm3files now store single-byte values for each sample in the range[-128,127]. This simplifies conversion to other formats (including binary).All changes were done programmatically. The python function of note was:
Python function used