summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcorgan2008-02-28 23:14:07 +0000
committerjcorgan2008-02-28 23:14:07 +0000
commitc7da4a90c594001596ab869cfa4bfb2479c9ac6d (patch)
treef21c079a1097c2c5d1e51df35927e66845fd6b92
parent9905fe273103025303358c57b79e8c197d95da3b (diff)
downloadgnuradio-c7da4a90c594001596ab869cfa4bfb2479c9ac6d.tar.gz
gnuradio-c7da4a90c594001596ab869cfa4bfb2479c9ac6d.tar.bz2
gnuradio-c7da4a90c594001596ab869cfa4bfb2479c9ac6d.zip
Adjust ref-scale to match observed amplitude on oscope.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7871 221aa14e-8319-0410-a670-987f0aec2ac5
-rwxr-xr-xgr-wxgui/src/python/fftsink2.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gr-wxgui/src/python/fftsink2.py b/gr-wxgui/src/python/fftsink2.py
index b9e1a47f3..fbddd71cf 100755
--- a/gr-wxgui/src/python/fftsink2.py
+++ b/gr-wxgui/src/python/fftsink2.py
@@ -91,7 +91,7 @@ class fft_sink_base(object):
class fft_sink_f(gr.hier_block2, fft_sink_base):
- def __init__(self, parent, baseband_freq=0, ref_scale=1.0,
+ def __init__(self, parent, baseband_freq=0, ref_scale=2.0,
y_per_div=10, y_divs=8, ref_level=50, sample_rate=1, fft_size=512,
fft_rate=default_fft_rate, average=False, avg_alpha=None,
title='', size=default_fftsink_size, peak_hold=False):
@@ -124,7 +124,7 @@ class fft_sink_f(gr.hier_block2, fft_sink_base):
self.log = gr.nlog10_ff(20, self.fft_size,
-20*math.log10(self.fft_size) # Adjust for number of bins
-10*math.log10(power/self.fft_size) # Adjust for windowing loss
- -20*math.log10(ref_scale)) # Adjust for reference scale
+ -20*math.log10(ref_scale/2)) # Adjust for reference scale
self.sink = gr.message_sink(gr.sizeof_float * self.fft_size, self.msgq, True)
self.connect(self, self.s2p, self.one_in_n, self.fft, self.c2mag, self.avg, self.log, self.sink)
@@ -134,7 +134,7 @@ class fft_sink_f(gr.hier_block2, fft_sink_base):
class fft_sink_c(gr.hier_block2, fft_sink_base):
- def __init__(self, parent, baseband_freq=0, ref_scale=1.0,
+ def __init__(self, parent, baseband_freq=0, ref_scale=2.0,
y_per_div=10, y_divs=8, ref_level=50, sample_rate=1, fft_size=512,
fft_rate=default_fft_rate, average=False, avg_alpha=None,
title='', size=default_fftsink_size, peak_hold=False):
@@ -167,7 +167,7 @@ class fft_sink_c(gr.hier_block2, fft_sink_base):
self.log = gr.nlog10_ff(20, self.fft_size,
-20*math.log10(self.fft_size) # Adjust for number of bins
-10*math.log10(power/self.fft_size) # Adjust for windowing loss
- -20*math.log10(ref_scale)) # Adjust for reference scale
+ -20*math.log10(ref_scale/2)) # Adjust for reference scale
self.sink = gr.message_sink(gr.sizeof_float * self.fft_size, self.msgq, True)
self.connect(self, self.s2p, self.one_in_n, self.fft, self.c2mag, self.avg, self.log, self.sink)