commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r11293 - gnuradio/branches/developers/trondeau/pfb/gnu


From: trondeau
Subject: [Commit-gnuradio] r11293 - gnuradio/branches/developers/trondeau/pfb/gnuradio-examples/python/pfb
Date: Thu, 25 Jun 2009 21:39:00 -0600 (MDT)

Author: trondeau
Date: 2009-06-25 21:39:00 -0600 (Thu, 25 Jun 2009)
New Revision: 11293

Modified:
   
gnuradio/branches/developers/trondeau/pfb/gnuradio-examples/python/pfb/channelize.py
   
gnuradio/branches/developers/trondeau/pfb/gnuradio-examples/python/pfb/chirp_channelize.py
Log:
Using the new blks2 channelizer to simplify the interface.

Modified: 
gnuradio/branches/developers/trondeau/pfb/gnuradio-examples/python/pfb/channelize.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/pfb/gnuradio-examples/python/pfb/channelize.py
        2009-06-26 03:37:46 UTC (rev 11292)
+++ 
gnuradio/branches/developers/trondeau/pfb/gnuradio-examples/python/pfb/channelize.py
        2009-06-26 03:39:00 UTC (rev 11293)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from gnuradio import gr
+from gnuradio import gr, blks2
 import math
 import os
 import scipy, pylab
@@ -35,25 +35,19 @@
             self.connect(self.signals[i], (self.add,i))
 
         self.head = gr.head(gr.sizeof_gr_complex, self._N)
-
-        self.s2ss = gr.stream_to_streams(gr.sizeof_gr_complex, self._M)
-        self.pfb = gr.pfb_channelizer_ccf(self._M, self._taps)
-        self.v2s = gr.vector_to_streams(gr.sizeof_gr_complex, self._M)
-
+        self.pfb = blks2.pfb_channelizer_ccf(self._M, self._taps)
         self.snk_i = gr.vector_sink_c()
 
+        # Connect the blocks
+        self.connect(self.add, self.head, self.pfb)
+        self.connect(self.add, self.snk_i)
+
         # Create a file sink for each of M output channels of the filter and 
connect it
         self.snks = list()
         for i in xrange(self._M):
-            self.connect((self.s2ss, i), (self.pfb, i))
             self.snks.append(gr.vector_sink_c())
-            self.connect((self.v2s, i), self.snks[i])
+            self.connect((self.pfb, i), self.snks[i])
                              
-        # Connect the rest
-        #self.connect(self.add, self.head, self.pfb)
-        self.connect(self.add, self.head, self.s2ss)
-        self.connect(self.pfb, self.v2s)
-        self.connect(self.add, self.snk_i)
 
 def main():
     tstart = time.time()

Modified: 
gnuradio/branches/developers/trondeau/pfb/gnuradio-examples/python/pfb/chirp_channelize.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/pfb/gnuradio-examples/python/pfb/chirp_channelize.py
  2009-06-26 03:37:46 UTC (rev 11292)
+++ 
gnuradio/branches/developers/trondeau/pfb/gnuradio-examples/python/pfb/chirp_channelize.py
  2009-06-26 03:39:00 UTC (rev 11293)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from gnuradio import gr
+from gnuradio import gr, blks2
 import math
 import os
 import scipy, pylab
@@ -35,25 +35,20 @@
         self.f2c = gr.float_to_complex()
 
         self.head = gr.head(gr.sizeof_gr_complex, self._N)
-
-        self.s2ss = gr.stream_to_streams(gr.sizeof_gr_complex, self._M)
-        self.pfb = gr.pfb_channelizer_ccf(self._M, self._taps)
-        self.v2s = gr.vector_to_streams(gr.sizeof_gr_complex, self._M)
-
+        self.pfb = blks2.pfb_channelizer_ccf(self._M, self._taps)
         self.snk_i = gr.vector_sink_c()
 
+        # Connect the rest
+        self.connect(self.vco_input, self.vco, self.f2c)
+        self.connect(self.f2c, self.head, self.pfb)
+        self.connect(self.f2c, self.snk_i)
+
         # Create a file sink for each of M output channels of the filter and 
connect it
         self.snks = list()
         for i in xrange(self._M):
-            self.connect((self.s2ss, i), (self.pfb, i))
             self.snks.append(gr.vector_sink_c())
-            self.connect((self.v2s, i), self.snks[i])
+            self.connect((self.pfb, i), self.snks[i])
                              
-        # Connect the rest
-        self.connect(self.vco_input, self.vco, self.f2c)
-        self.connect(self.f2c, self.head, self.s2ss)
-        self.connect(self.pfb, self.v2s)
-        self.connect(self.f2c, self.snk_i)
 
 def main():
     tstart = time.time()





reply via email to

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