diff options
author | Matt Ettus | 2009-09-04 10:29:00 -0700 |
---|---|---|
committer | Matt Ettus | 2009-09-04 10:29:00 -0700 |
commit | e103e18f8b8111cd07edc2bb0294aa58a426e371 (patch) | |
tree | 429d96819fc8b04c965eda3a0c2b93f2e94f9080 /gr-wxgui/src/python/waterfall_window.py | |
parent | 5965a434d0923738d49334eb5f3d74a259e7b431 (diff) | |
parent | 20006003431d7260b04964eb684b1746ffb0a85f (diff) | |
download | gnuradio-e103e18f8b8111cd07edc2bb0294aa58a426e371.tar.gz gnuradio-e103e18f8b8111cd07edc2bb0294aa58a426e371.tar.bz2 gnuradio-e103e18f8b8111cd07edc2bb0294aa58a426e371.zip |
Merge branch 'master' into new_eth
Diffstat (limited to 'gr-wxgui/src/python/waterfall_window.py')
-rw-r--r-- | gr-wxgui/src/python/waterfall_window.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gr-wxgui/src/python/waterfall_window.py b/gr-wxgui/src/python/waterfall_window.py index c00992e14..28e67a830 100644 --- a/gr-wxgui/src/python/waterfall_window.py +++ b/gr-wxgui/src/python/waterfall_window.py @@ -237,16 +237,10 @@ class waterfall_window(wx.Panel, pubsub.pubsub): Does not affect the current data in the waterfall. """ if not len(self.samples): return - #get the peak level (max of the samples) - peak_level = numpy.max(self.samples) - #get the noise floor (averge the smallest samples) - noise_floor = numpy.average(numpy.sort(self.samples)[:len(self.samples)/4]) - #padding - noise_floor -= abs(noise_floor)*.5 - peak_level += abs(peak_level)*.1 + min_level, max_level = common.get_min_max_fft(self.samples) #set the range and level - self[REF_LEVEL_KEY] = peak_level - self[DYNAMIC_RANGE_KEY] = peak_level - noise_floor + self[REF_LEVEL_KEY] = max_level + self[DYNAMIC_RANGE_KEY] = max_level - min_level def handle_msg(self, msg): """ |