From 5ede0e2b1457d7c28ad29c5f2322305621a3b26a Mon Sep 17 00:00:00 2001 From: jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5> Date: Thu, 28 Feb 2008 19:03:55 +0000 Subject: Added reference scaling to fftsink2. Default behavior is unchanged. The new parameter 'ref_scale', defaulting to 1.0, represents a 0 dB y-axis value. Updated usrp_fft.py to display dBFS by setting ref_scale to 32768.0 and ref_level to 0. This results in the full 100 dB of dynamic range being displayed. Updated some gnuradio-examples to use the new parameter. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7863 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-utils/src/python/usrp_fft.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gr-utils/src/python/usrp_fft.py') diff --git a/gr-utils/src/python/usrp_fft.py b/gr-utils/src/python/usrp_fft.py index d549dd4e39..30a06911ae 100755 --- a/gr-utils/src/python/usrp_fft.py +++ b/gr-utils/src/python/usrp_fft.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004,2005,2007 Free Software Foundation, Inc. +# Copyright 2004,2005,2007,2008 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -115,7 +115,8 @@ 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, y_divs = 10) + self.scope = fftsink2.fft_sink_c (panel, fft_size=1024, sample_rate=input_rate, + ref_scale=32768.0, ref_level=0.0, y_divs = 10) self.connect(self.u, self.scope) -- cgit v1.2.3