summaryrefslogtreecommitdiff
path: root/gr-utils
diff options
context:
space:
mode:
authorjcorgan2008-11-11 15:51:23 +0000
committerjcorgan2008-11-11 15:51:23 +0000
commit9f6d3260f13cbfb138dc54bdec9935ea97cdcc22 (patch)
tree5f7caa7ad85343bbd693840805f184efa7e26553 /gr-utils
parenteed0956a285e6aaf062a5c6f69e17bccd8ef8a20 (diff)
downloadgnuradio-9f6d3260f13cbfb138dc54bdec9935ea97cdcc22.tar.gz
gnuradio-9f6d3260f13cbfb138dc54bdec9935ea97cdcc22.tar.bz2
gnuradio-9f6d3260f13cbfb138dc54bdec9935ea97cdcc22.zip
Add --fft-size command-line parameter, defaults to original behavior (1024)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9970 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-utils')
-rwxr-xr-xgr-utils/src/python/usrp_fft.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gr-utils/src/python/usrp_fft.py b/gr-utils/src/python/usrp_fft.py
index 8a9008877..3da62e29e 100755
--- a/gr-utils/src/python/usrp_fft.py
+++ b/gr-utils/src/python/usrp_fft.py
@@ -77,6 +77,9 @@ class app_top_block(stdgui2.std_top_block):
help="Set fftsink averaging factor, default=[%default]")
parser.add_option("", "--ref-scale", type="eng_float", default=13490.0,
help="Set dBFS=0dB input value, default=[%default]")
+ parser.add_option("", "--fft-size", type="int", default=1024,
+ help="Set FFT frame size");
+
(options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
@@ -115,11 +118,11 @@ class app_top_block(stdgui2.std_top_block):
if options.waterfall:
self.scope = \
- waterfallsink2.waterfall_sink_c (panel, fft_size=1024, sample_rate=input_rate)
+ waterfallsink2.waterfall_sink_c (panel, fft_size=options.fft_size, sample_rate=input_rate)
elif options.oscilloscope:
self.scope = scopesink2.scope_sink_c(panel, sample_rate=input_rate)
else:
- self.scope = fftsink2.fft_sink_c (panel, fft_size=1024, sample_rate=input_rate,
+ self.scope = fftsink2.fft_sink_c (panel, fft_size=options.fft_size, sample_rate=input_rate,
ref_scale=options.ref_scale, ref_level=0.0, y_divs = 10,
avg_alpha=options.avg_alpha)