From a70c291e3cd4fc3d51f2eebb6b39cdb9d46862da Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 2 Sep 2009 14:18:28 -0700 Subject: waterfall and fft use a common autoscale function --- gr-wxgui/src/python/fft_window.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'gr-wxgui/src/python/fft_window.py') diff --git a/gr-wxgui/src/python/fft_window.py b/gr-wxgui/src/python/fft_window.py index 4c575f1a6..237c8940c 100644 --- a/gr-wxgui/src/python/fft_window.py +++ b/gr-wxgui/src/python/fft_window.py @@ -254,17 +254,7 @@ class fft_window(wx.Panel, pubsub.pubsub): Set the dynamic range and reference level. """ if not len(self.samples): return - #get the peak level (max of the samples) - peak_level = numpy.max(self.samples) - #separate noise samples - noise_samps = numpy.sort(self.samples)[:len(self.samples)/2] - #get the noise floor - noise_floor = numpy.average(noise_samps) - #get the noise deviation - noise_dev = numpy.std(noise_samps) - #determine the maximum and minimum levels - max_level = peak_level - min_level = noise_floor - abs(2*noise_dev) + min_level, max_level = common.get_min_max_fft(self.samples) #set the range to a clean number of the dynamic range self[Y_PER_DIV_KEY] = common.get_clean_num(1+(max_level - min_level)/self[Y_DIVS_KEY]) #set the reference level to a multiple of y per div -- cgit