aboutsummaryrefslogtreecommitdiffstats
path: root/tools/mega_fft/mega_fft_2ch.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mega_fft/mega_fft_2ch.py')
-rwxr-xr-xtools/mega_fft/mega_fft_2ch.py121
1 files changed, 61 insertions, 60 deletions
diff --git a/tools/mega_fft/mega_fft_2ch.py b/tools/mega_fft/mega_fft_2ch.py
index c8a74bc26..32543cf6e 100755
--- a/tools/mega_fft/mega_fft_2ch.py
+++ b/tools/mega_fft/mega_fft_2ch.py
@@ -1,8 +1,9 @@
#!/usr/bin/env python2
##################################################
# GNU Radio Python Flow Graph
+# Copyright 2014 National Instruments
+#
# Title: Mega FFT
-# Author: Balint Seeber, Ettus Research
# Description: Standard edition, dual-channel
# Generated: Sun Jul 26 20:09:53 2015
##################################################
@@ -174,7 +175,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
cpu_format="fc32",
channels=range(2),
),
-
+
)
if spec != "": self.src.set_subdev_spec(spec, 0)
self.src.set_samp_rate(requested_sample_rate)
@@ -222,7 +223,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -263,7 +264,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
self.nb.GetPage(0).Add(self.fft_sink.win)
def fft_sink_callback(x, y):
self.set_clicked_freq(x)
-
+
self.fft_sink.set_callback(fft_sink_callback)
self.waterfall_sink = waterfallsink2.waterfall_sink_c(
self.nb.GetPage(2).GetWin(),
@@ -284,7 +285,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
self.nb.GetPage(2).Add(self.waterfall_sink.win)
def waterfall_sink_callback(x, y):
self.set_clicked_freq(x)
-
+
self.waterfall_sink.set_callback(waterfall_sink_callback)
self._test_chooser = forms.button(
parent=self.nb_test.GetPage(0).GetWin(),
@@ -380,7 +381,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -425,7 +426,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -470,7 +471,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -578,7 +579,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -646,7 +647,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
self.nb.GetPage(2).Add(self.waterfall_sink_0.win)
def waterfall_sink_0_callback(x, y):
self.set_clicked_freq(x)
-
+
self.waterfall_sink_0.set_callback(waterfall_sink_0_callback)
self._variable_static_usrp_info_static_text = forms.static_text(
parent=self.nb_info.GetPage(0).GetWin(),
@@ -776,7 +777,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -820,7 +821,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -865,7 +866,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -910,7 +911,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -954,7 +955,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -999,7 +1000,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1044,7 +1045,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1089,7 +1090,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1134,7 +1135,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1210,7 +1211,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1385,7 +1386,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1476,7 +1477,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1544,7 +1545,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1584,7 +1585,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
self.nb.GetPage(0).Add(self.fft_sink_two_1.win)
def fft_sink_two_1_callback(x, y):
self.set_clicked_freq(x)
-
+
self.fft_sink_two_1.set_callback(fft_sink_two_1_callback)
self.fft_max_lvl_probe = blocks.probe_signal_f()
if probe_interval > 0:
@@ -1702,7 +1703,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1794,7 +1795,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1837,7 +1838,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1882,7 +1883,7 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
de = wx.PyEvent()
de.SetEventType(wxEVT_AnyCode)
wx.PostEvent(self.GetWin(), de)
- except TypeError:
+ except TypeError:
pass
except AttributeError: # FIXME
print "Cannot post message"
@@ -1907,38 +1908,38 @@ class mega_fft_2ch(grc_wxgui.top_block_gui):
##################################################
# Connections
##################################################
- self.connect((self.blks2_selector_0, 0), (self.wxgui_scopesink2_0, 0))
- self.connect((self.blks2_selector_0_0, 0), (self.blks2_selector_0, 0))
- self.connect((self.blks2_selector_0_0, 1), (self.blocks_complex_to_mag_0, 0))
- self.connect((self.blks2_selector_0_0_0, 0), (self.blks2_selector_0_1, 0))
- self.connect((self.blks2_selector_0_0_0, 1), (self.blocks_complex_to_mag_0_0, 0))
- self.connect((self.blks2_selector_0_1, 0), (self.wxgui_scopesink2_0_0, 0))
- self.connect((self.blocks_argmax_xx_0, 1), (self.blocks_null_sink_0, 0))
- self.connect((self.blocks_argmax_xx_0, 0), (self.fft_max_idx_probe, 0))
- self.connect((self.blocks_argmax_xx_0_0, 1), (self.blocks_null_sink_0_0, 0))
- self.connect((self.blocks_argmax_xx_0_0, 0), (self.fft_max_idx_probe_0, 0))
- self.connect((self.blocks_complex_to_mag_0, 0), (self.blocks_float_to_complex_0, 1))
- self.connect((self.blocks_complex_to_mag_0, 0), (self.blocks_float_to_complex_0, 0))
- self.connect((self.blocks_complex_to_mag_0_0, 0), (self.blocks_float_to_complex_0_0, 1))
- self.connect((self.blocks_complex_to_mag_0_0, 0), (self.blocks_float_to_complex_0_0, 0))
- self.connect((self.blocks_float_to_complex_0, 0), (self.blks2_selector_0, 1))
- self.connect((self.blocks_float_to_complex_0_0, 0), (self.blks2_selector_0_1, 1))
- self.connect((self.blocks_max_xx_0, 0), (self.fft_max_lvl_probe, 0))
- self.connect((self.blocks_max_xx_0_0, 0), (self.fft_max_lvl_probe_2, 0))
- self.connect((self.logpwrfft_x_0, 0), (self.blocks_argmax_xx_0, 0))
- self.connect((self.logpwrfft_x_0, 0), (self.blocks_max_xx_0, 0))
- self.connect((self.logpwrfft_x_0_0, 0), (self.blocks_argmax_xx_0_0, 0))
- self.connect((self.logpwrfft_x_0_0, 0), (self.blocks_max_xx_0_0, 0))
- self.connect((self.src, 0), (self.blocks_tag_debug_0, 0))
- self.connect((self.src, 0), (self.blks2_selector_0_0, 0))
- self.connect((self.src, 0), (self.fft_sink, 0))
- self.connect((self.src, 0), (self.waterfall_sink, 0))
- self.connect((self.src, 0), (self.probe_avg_mag, 0))
- self.connect((self.src, 0), (self.logpwrfft_x_0, 0))
- self.connect((self.src, 1), (self.blks2_selector_0_0_0, 0))
- self.connect((self.src, 1), (self.fft_sink_two_1, 0))
- self.connect((self.src, 1), (self.logpwrfft_x_0_0, 0))
- self.connect((self.src, 1), (self.waterfall_sink_0, 0))
+ self.connect((self.blks2_selector_0, 0), (self.wxgui_scopesink2_0, 0))
+ self.connect((self.blks2_selector_0_0, 0), (self.blks2_selector_0, 0))
+ self.connect((self.blks2_selector_0_0, 1), (self.blocks_complex_to_mag_0, 0))
+ self.connect((self.blks2_selector_0_0_0, 0), (self.blks2_selector_0_1, 0))
+ self.connect((self.blks2_selector_0_0_0, 1), (self.blocks_complex_to_mag_0_0, 0))
+ self.connect((self.blks2_selector_0_1, 0), (self.wxgui_scopesink2_0_0, 0))
+ self.connect((self.blocks_argmax_xx_0, 1), (self.blocks_null_sink_0, 0))
+ self.connect((self.blocks_argmax_xx_0, 0), (self.fft_max_idx_probe, 0))
+ self.connect((self.blocks_argmax_xx_0_0, 1), (self.blocks_null_sink_0_0, 0))
+ self.connect((self.blocks_argmax_xx_0_0, 0), (self.fft_max_idx_probe_0, 0))
+ self.connect((self.blocks_complex_to_mag_0, 0), (self.blocks_float_to_complex_0, 1))
+ self.connect((self.blocks_complex_to_mag_0, 0), (self.blocks_float_to_complex_0, 0))
+ self.connect((self.blocks_complex_to_mag_0_0, 0), (self.blocks_float_to_complex_0_0, 1))
+ self.connect((self.blocks_complex_to_mag_0_0, 0), (self.blocks_float_to_complex_0_0, 0))
+ self.connect((self.blocks_float_to_complex_0, 0), (self.blks2_selector_0, 1))
+ self.connect((self.blocks_float_to_complex_0_0, 0), (self.blks2_selector_0_1, 1))
+ self.connect((self.blocks_max_xx_0, 0), (self.fft_max_lvl_probe, 0))
+ self.connect((self.blocks_max_xx_0_0, 0), (self.fft_max_lvl_probe_2, 0))
+ self.connect((self.logpwrfft_x_0, 0), (self.blocks_argmax_xx_0, 0))
+ self.connect((self.logpwrfft_x_0, 0), (self.blocks_max_xx_0, 0))
+ self.connect((self.logpwrfft_x_0_0, 0), (self.blocks_argmax_xx_0_0, 0))
+ self.connect((self.logpwrfft_x_0_0, 0), (self.blocks_max_xx_0_0, 0))
+ self.connect((self.src, 0), (self.blocks_tag_debug_0, 0))
+ self.connect((self.src, 0), (self.blks2_selector_0_0, 0))
+ self.connect((self.src, 0), (self.fft_sink, 0))
+ self.connect((self.src, 0), (self.waterfall_sink, 0))
+ self.connect((self.src, 0), (self.probe_avg_mag, 0))
+ self.connect((self.src, 0), (self.logpwrfft_x_0, 0))
+ self.connect((self.src, 1), (self.blks2_selector_0_0_0, 0))
+ self.connect((self.src, 1), (self.fft_sink_two_1, 0))
+ self.connect((self.src, 1), (self.logpwrfft_x_0_0, 0))
+ self.connect((self.src, 1), (self.waterfall_sink_0, 0))
def get_antenna(self):