commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 02/05: wxgui: use complex_to_mag_squared in


From: git
Subject: [Commit-gnuradio] [gnuradio] 02/05: wxgui: use complex_to_mag_squared instead of complex_to_mag in wxgui fftsink_nongl
Date: Wed, 15 Oct 2014 14:06:03 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch master
in repository gnuradio.

commit 2545114ad3710ca6be776a890122fb4abb851f22
Author: Michael Ossmann <address@hidden>
Date:   Fri Sep 19 12:52:48 2014 -0600

    wxgui: use complex_to_mag_squared instead of complex_to_mag in wxgui 
fftsink_nongl
---
 gr-wxgui/python/wxgui/fftsink_nongl.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gr-wxgui/python/wxgui/fftsink_nongl.py 
b/gr-wxgui/python/wxgui/fftsink_nongl.py
index be69e41..c63f0fb 100644
--- a/gr-wxgui/python/wxgui/fftsink_nongl.py
+++ b/gr-wxgui/python/wxgui/fftsink_nongl.py
@@ -136,17 +136,17 @@ class fft_sink_f(gr.hier_block2, fft_sink_base):
         for tap in mywindow:
             power += tap*tap
 
-        self.c2mag = blocks.complex_to_mag(self.fft_size)
+        self.c2magsq = blocks.complex_to_mag_squared(self.fft_size)
         self.avg = grfilter.single_pole_iir_filter_ff(1.0, self.fft_size)
 
         # FIXME  We need to add 3dB to all bins but the DC bin
-        self.log = blocks.nlog10_ff(20, self.fft_size,
+        self.log = blocks.nlog10_ff(10, 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/2))                # 
Adjust for reference scale
 
         self.sink = blocks.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)
+        self.connect(self, self.s2p, self.one_in_n, self.fft, self.c2magsq, 
self.avg, self.log, self.sink)
 
         self.win = fft_window(self, parent, size=size)
         self.set_average(self.average)
@@ -183,17 +183,17 @@ class fft_sink_c(gr.hier_block2, fft_sink_base):
         for tap in mywindow:
             power += tap*tap
 
-        self.c2mag = blocks.complex_to_mag(self.fft_size)
+        self.c2magsq = blocks.complex_to_mag_squared(self.fft_size)
         self.avg = grfilter.single_pole_iir_filter_ff(1.0, self.fft_size)
 
         # FIXME  We need to add 3dB to all bins but the DC bin
-        self.log = blocks.nlog10_ff(20, self.fft_size,
+        self.log = blocks.nlog10_ff(10, 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/2))                # 
Adjust for reference scale
 
         self.sink = blocks.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)
+        self.connect(self, self.s2p, self.one_in_n, self.fft, self.c2magsq, 
self.avg, self.log, self.sink)
 
         self.win = fft_window(self, parent, size=size)
         self.set_average(self.average)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]