commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10861 - in gnuradio/trunk: gnuradio-examples/python/d


From: jcorgan
Subject: [Commit-gnuradio] r10861 - in gnuradio/trunk: gnuradio-examples/python/digital gnuradio-examples/python/ofdm gr-qtgui/src/python
Date: Thu, 16 Apr 2009 01:54:34 -0600 (MDT)

Author: jcorgan
Date: 2009-04-16 01:54:34 -0600 (Thu, 16 Apr 2009)
New Revision: 10861

Modified:
   gnuradio/trunk/gnuradio-examples/python/digital/benchmark_loopback.py
   gnuradio/trunk/gnuradio-examples/python/ofdm/benchmark_ofdm.py
   gnuradio/trunk/gr-qtgui/src/python/pyqt_example.py
   gnuradio/trunk/gr-qtgui/src/python/qt_digital.py
Log:
Change our examples to use gr.channel_model instead of blks2.channel_model

Modified: gnuradio/trunk/gnuradio-examples/python/digital/benchmark_loopback.py
===================================================================
--- gnuradio/trunk/gnuradio-examples/python/digital/benchmark_loopback.py       
2009-04-16 07:30:41 UTC (rev 10860)
+++ gnuradio/trunk/gnuradio-examples/python/digital/benchmark_loopback.py       
2009-04-16 07:54:34 UTC (rev 10861)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -20,7 +20,7 @@
 # Boston, MA 02110-1301, USA.
 # 
 
-from gnuradio import gr, gru, modulation_utils, blks2
+from gnuradio import gr, gru, modulation_utils
 from gnuradio import eng_notation
 from gnuradio.eng_option import eng_option
 from optparse import OptionParser
@@ -50,7 +50,7 @@
         self.rxpath = receive_path(demod_class, rx_callback, options)
 
         if channelon:
-            self.channel = blks2.channel_model(noise_voltage, 
frequency_offset, 1.01)
+            self.channel = gr.channel_model(noise_voltage, frequency_offset, 
1.01)
 
             if options.discontinuous:
                 z = 20000*[0,]

Modified: gnuradio/trunk/gnuradio-examples/python/ofdm/benchmark_ofdm.py
===================================================================
--- gnuradio/trunk/gnuradio-examples/python/ofdm/benchmark_ofdm.py      
2009-04-16 07:30:41 UTC (rev 10860)
+++ gnuradio/trunk/gnuradio-examples/python/ofdm/benchmark_ofdm.py      
2009-04-16 07:54:34 UTC (rev 10861)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2006, 2007 Free Software Foundation, Inc.
+# Copyright 2006, 2007, 2009 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -71,8 +71,8 @@
 
         #self.mux = gr.stream_mux(gr.sizeof_gr_complex, stream_size)
         self.throttle = gr.throttle(gr.sizeof_gr_complex, options.sample_rate)
-        self.channel = blks2.channel_model(noise_voltage, frequency_offset,
-                                           options.clockrate_ratio, taps)
+        self.channel = gr.channel_model(noise_voltage, frequency_offset,
+                                        options.clockrate_ratio, taps)
         self.rxpath = receive_path(callback, options)
                 
         #self.connect(self.zeros, (self.mux,0))

Modified: gnuradio/trunk/gr-qtgui/src/python/pyqt_example.py
===================================================================
--- gnuradio/trunk/gr-qtgui/src/python/pyqt_example.py  2009-04-16 07:30:41 UTC 
(rev 10860)
+++ gnuradio/trunk/gr-qtgui/src/python/pyqt_example.py  2009-04-16 07:54:34 UTC 
(rev 10861)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from gnuradio import gr, blks2
+from gnuradio import gr
 from gnuradio.qtgui import qtgui
 from PyQt4 import QtGui, QtCore
 import sys, sip
@@ -111,7 +111,7 @@
         src1 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f1, 0.1, 0)
         src2 = gr.sig_source_c(Rs, gr.GR_SIN_WAVE, f2, 0.1, 0)
         src  = gr.add_cc()
-        channel = blks2.channel_model(0.001)
+        channel = gr.channel_model(0.001)
         thr = gr.throttle(gr.sizeof_gr_complex, 100*fftsize)
         self.snk1 = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
                                  -Rs/2, Rs/2,

Modified: gnuradio/trunk/gr-qtgui/src/python/qt_digital.py
===================================================================
--- gnuradio/trunk/gr-qtgui/src/python/qt_digital.py    2009-04-16 07:30:41 UTC 
(rev 10860)
+++ gnuradio/trunk/gr-qtgui/src/python/qt_digital.py    2009-04-16 07:54:34 UTC 
(rev 10861)
@@ -74,7 +74,7 @@
     def noiseEditText(self):
         try:
             noise = self.noiseEdit.text().toDouble()[0]
-            self.channel.noise.set_amplitude(noise)
+            self.channel.set_noise_voltage(noise)
 
             self.noise = noise
         except RuntimeError:
@@ -83,7 +83,7 @@
     def freqEditText(self):
         try:
             freq = self.freqEdit.text().toDouble()[0]
-            self.channel.freq_offset.set_frequency(freq)
+            self.channel.set_frequency_offset(freq)
 
             self.freq = freq
         except RuntimeError:
@@ -92,7 +92,7 @@
     def timeEditText(self):
         try:
             to = self.timeEdit.text().toDouble()[0]
-            self.channel.timing_offset.set_interp_ratio(to)
+            self.channel.set_timing_offset(to)
 
             self.timing_offset = to
         except RuntimeError:
@@ -121,7 +121,7 @@
         noise = 1e-7
         fo = 1e-6
         to = 1.0
-        channel = blks2.channel_model(noise, fo, to)
+        channel = gr.channel_model(noise, fo, to)
 
         thr = gr.throttle(gr.sizeof_gr_complex, 10*fftsize)
         self.snk_tx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, 
-1/2, 1/2,





reply via email to

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