diff options
author | Tom Rondeau | 2012-12-05 12:46:05 -0500 |
---|---|---|
committer | Tom Rondeau | 2012-12-05 12:46:05 -0500 |
commit | f47f3cc0fa5521d644305f1d7a08a0ba3676b22d (patch) | |
tree | 0abc3c732c1348741a2d24bbb1a4714dbbdc08b3 /gnuradio-core | |
parent | 3ccdc6cd9469894dbf3ce34544b4ec21764456de (diff) | |
download | gnuradio-f47f3cc0fa5521d644305f1d7a08a0ba3676b22d.tar.gz gnuradio-f47f3cc0fa5521d644305f1d7a08a0ba3676b22d.tar.bz2 gnuradio-f47f3cc0fa5521d644305f1d7a08a0ba3676b22d.zip |
core: metadata file parser updated for more sig figs on display.
Diffstat (limited to 'gnuradio-core')
-rw-r--r-- | gnuradio-core/src/python/gnuradio/parse_file_metadata.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gnuradio-core/src/python/gnuradio/parse_file_metadata.py b/gnuradio-core/src/python/gnuradio/parse_file_metadata.py index 053f096c1..4f5547211 100644 --- a/gnuradio-core/src/python/gnuradio/parse_file_metadata.py +++ b/gnuradio-core/src/python/gnuradio/parse_file_metadata.py @@ -75,7 +75,7 @@ def parse_header(p, VERBOSE=False): samp_rate = gr.pmt_to_double(r) info["rx_rate"] = samp_rate if(VERBOSE): - print "Sample Rate: {0} sps".format(samp_rate) + print "Sample Rate: {0:.2f} sps".format(samp_rate) else: sys.stderr.write("Could not find key 'sr': invalid or corrupt data file.\n") sys.exit(1) @@ -90,7 +90,7 @@ def parse_header(p, VERBOSE=False): t = secs + fracs info["rx_time"] = t if(VERBOSE): - print "Seconds: {0}".format(t) + print "Seconds: {0:.6f}".format(t) else: sys.stderr.write("Could not find key 'time': invalid or corrupt data file.\n") sys.exit(1) @@ -169,6 +169,6 @@ def parse_extra_dict(p, info, VERBOSE=False): val = gr.pmt_to_double(gr.pmt_cdr(item)) info[key] = val if(VERBOSE): - print "{0}: {1}".format(key, val) + print "{0}: {1:.4f}".format(key, val) return info |