summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt2009-01-31 23:23:27 +0000
committermatt2009-01-31 23:23:27 +0000
commit99bacfb2b8a51698aa2e1f98079488a63484bfc3 (patch)
treec1005d310977b175c2b70a0d82c7af267bfaa578
parent4aa6f03ab50ec4a9d66e18cb578fe17528209a9f (diff)
downloadgnuradio-99bacfb2b8a51698aa2e1f98079488a63484bfc3.tar.gz
gnuradio-99bacfb2b8a51698aa2e1f98079488a63484bfc3.tar.bz2
gnuradio-99bacfb2b8a51698aa2e1f98079488a63484bfc3.zip
set fft-size from command line, default to 12 divs vertical
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10354 221aa14e-8319-0410-a670-987f0aec2ac5
-rwxr-xr-xgr-utils/src/python/usrp2_fft.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/gr-utils/src/python/usrp2_fft.py b/gr-utils/src/python/usrp2_fft.py
index c4b73753c..1e8cf89ea 100755
--- a/gr-utils/src/python/usrp2_fft.py
+++ b/gr-utils/src/python/usrp2_fft.py
@@ -58,6 +58,8 @@ class app_top_block(stdgui2.std_top_block):
help="Set fftsink averaging factor, default=[%default]")
parser.add_option("", "--ref-scale", type="eng_float", default=1.0,
help="Set dBFS=0dB input value, default=[%default]")
+ parser.add_option("--fft-size", type="int", default=1024,
+ help="Set number of FFT bins [default=%default]")
(options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
@@ -76,8 +78,12 @@ class app_top_block(stdgui2.std_top_block):
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,
- ref_scale=options.ref_scale, ref_level=0.0, y_divs = 10,
+ self.scope = fftsink2.fft_sink_c (panel,
+ fft_size=options.fft_size,
+ sample_rate=input_rate,
+ ref_scale=options.ref_scale,
+ ref_level=20.0,
+ y_divs = 12,
avg_alpha=options.avg_alpha)
self.connect(self.u, self.scope)