commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r11450 - gnuradio/trunk/gr-wxgui/src/python


From: jblum
Subject: [Commit-gnuradio] r11450 - gnuradio/trunk/gr-wxgui/src/python
Date: Thu, 16 Jul 2009 18:36:11 -0600 (MDT)

Author: jblum
Date: 2009-07-16 18:36:11 -0600 (Thu, 16 Jul 2009)
New Revision: 11450

Modified:
   gnuradio/trunk/gr-wxgui/src/python/fft_window.py
   gnuradio/trunk/gr-wxgui/src/python/waterfall_window.py
Log:
fixed fft reording

Modified: gnuradio/trunk/gr-wxgui/src/python/fft_window.py
===================================================================
--- gnuradio/trunk/gr-wxgui/src/python/fft_window.py    2009-07-16 17:44:03 UTC 
(rev 11449)
+++ gnuradio/trunk/gr-wxgui/src/python/fft_window.py    2009-07-17 00:36:11 UTC 
(rev 11450)
@@ -239,8 +239,8 @@
                samples = numpy.fromstring(msg, numpy.float32)[:self.fft_size] 
#only take first frame
                num_samps = len(samples)
                #reorder fft
-               if self.real: samples = samples[:num_samps/2]
-               else: samples = numpy.concatenate((samples[num_samps/2:], 
samples[:num_samps/2]))
+               if self.real: samples = samples[:(num_samps+1)/2]
+               else: samples = numpy.concatenate((samples[num_samps/2+1:], 
samples[:(num_samps+1)/2]))
                self.samples = samples
                #peak hold calculation
                if self[PEAK_HOLD_KEY]:

Modified: gnuradio/trunk/gr-wxgui/src/python/waterfall_window.py
===================================================================
--- gnuradio/trunk/gr-wxgui/src/python/waterfall_window.py      2009-07-16 
17:44:03 UTC (rev 11449)
+++ gnuradio/trunk/gr-wxgui/src/python/waterfall_window.py      2009-07-17 
00:36:11 UTC (rev 11450)
@@ -261,8 +261,8 @@
                self.samples = samples = numpy.fromstring(msg, 
numpy.float32)[:self.fft_size] #only take first frame
                num_samps = len(samples)
                #reorder fft
-               if self.real: samples = samples[:num_samps/2]
-               else: samples = numpy.concatenate((samples[num_samps/2:], 
samples[:num_samps/2]))
+               if self.real: samples = samples[:(num_samps+1)/2]
+               else: samples = numpy.concatenate((samples[num_samps/2+1:], 
samples[:(num_samps+1)/2]))
                #plot the fft
                self.plotter.set_samples(
                        samples=samples,





reply via email to

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