From c7da4a90c594001596ab869cfa4bfb2479c9ac6d Mon Sep 17 00:00:00 2001 From: jcorgan Date: Thu, 28 Feb 2008 23:14:07 +0000 Subject: Adjust ref-scale to match observed amplitude on oscope. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7871 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-wxgui/src/python/fftsink2.py | 8 ++++---- 1 file 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) -- cgit