rss2i.py: Fit to new memory_decode functionality
Please fit the rss2i.py tool to the changes within the rss2ipy python module.
Road Map
We are going to implement the so-called raw sampling feature: The RSS2I devices are going to be capable of sampling raw, i.e. unprocessed, RSS values during packet reception or IQ samples during reception of a so-called Constant Tone Extension (CTE). These samples can be stored on the on-board flash memory on request. Therefor, a new flash encoding was introduced recently (c5109285).
Status
So far, most of these things are implemented. The last commit 6d706d7b replaced the page_decode
function of the rss2ipy python module with the new memory_decode
function. The latter is capable of decoding the new flash layout mentioned above.
Current Implementation
Up to now, the download
subcommand queries the measurement results from the devices in portions of so-called pages. Afterwards, these pages are put into the page_decode
function. Finally, the returned fragments of measurement results have to be assembled into the final measurement values that are written to a file afterwards.
Once we closed #18 (closed) and !21 (closed), the name of this file is RSS_xyz.tsv
.
Desired Implementation
With the changes made in 6d706d7b, this implementation needs to be adjusted. The new memory_decode
function takes all downloaded flash pages at once and returns the completely assembled measurement results. Beside that, the function also returns the mentioned raw samples, if any. Since there may be an immense amount of raw samples per frame, these samples are returned for each frame separately. Please see the rss2ipy doc for further details.
These samples, if available, should be written to the files samples_uvw_xyz.tsv
where xyz
denotes the device, from which the samples were recorded, and uvw
denotes the frame, during which the samples were taken. The format should be analog to the format of the RSS
files e.g.
# Cycle sample 0 sample 1 ...
0 123.+89.j 1.245e4+7.8e2j ...
1 12.5+0.j 4.8e3+7.7e2j ...
...
Possible Obstacles
- The
memory_decode
function returns numpy arrays. A missing value is denoted by annp.nan
. However, it should be further denoted with an asterisk*
within the written file. - Please keep on taking the
--csv
switch into account. - When there are no samples for a specific frame, i.e. the corresponding numpy array consists of
np.nan
s only, the corresponding file should not be written. - The samples may be of complex dtype.
- More to come... :)