diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-02-21 12:34:41 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-02-21 12:34:41 -0500 |
commit | 9f2ff1a31b0f4e8ea47a11f0e9674620b97f1e68 (patch) | |
tree | 8f35b2fd66c2c5e9db5c52a865d0634062dac587 | |
parent | 9b9203db08b303d40fbdc1f3bad5f2c16a00ceb1 (diff) |
qtgui: fixed a autoscale issue with byte file types.
-rw-r--r-- | gr-qtgui/apps/plot_base.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gr-qtgui/apps/plot_base.py b/gr-qtgui/apps/plot_base.py index 0990a309b7..52c888cff3 100644 --- a/gr-qtgui/apps/plot_base.py +++ b/gr-qtgui/apps/plot_base.py @@ -87,8 +87,14 @@ def read_samples_s(filename, start, in_size, min_size=0): scipy.int16, gr.sizeof_short) def read_samples_b(filename, start, in_size, min_size=0): - return read_samples(filename, start, in_size, min_size, - scipy.uint8, gr.sizeof_char) + d,mn,mx = read_samples(filename, start, in_size, min_size, + scipy.int8, gr.sizeof_char) + + # Bit of a hack since we want to read the data as signed ints, but + # the gr.vector_source_b will only accept unsigned. We read in as + # signed, do our min/max and things on that, then convert here. + d = scipy.array(d, dtype=scipy.uint8).tolist() + return d,mn,mx def read_samples_c(filename, start, in_size, min_size=0): # Complex samples are handled differently |