diff options
Diffstat (limited to 'gr-wxgui')
-rw-r--r-- | gr-wxgui/src/python/fft_window.py | 4 | ||||
-rw-r--r-- | gr-wxgui/src/python/waterfall_window.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gr-wxgui/src/python/fft_window.py b/gr-wxgui/src/python/fft_window.py index fded1a8fa..ba5711d10 100644 --- a/gr-wxgui/src/python/fft_window.py +++ b/gr-wxgui/src/python/fft_window.py @@ -239,8 +239,8 @@ class fft_window(wx.Panel, pubsub.pubsub): 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]: diff --git a/gr-wxgui/src/python/waterfall_window.py b/gr-wxgui/src/python/waterfall_window.py index 77819b733..c00992e14 100644 --- a/gr-wxgui/src/python/waterfall_window.py +++ b/gr-wxgui/src/python/waterfall_window.py @@ -261,8 +261,8 @@ class waterfall_window(wx.Panel, pubsub.pubsub): 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, |