summaryrefslogtreecommitdiff
path: root/gr-digital/examples
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital/examples')
-rwxr-xr-xgr-digital/examples/narrowband/benchmark_add_channel.py6
-rw-r--r--gr-digital/examples/narrowband/receive_path.py14
-rwxr-xr-xgr-digital/examples/snr_estimators.py4
3 files changed, 12 insertions, 12 deletions
diff --git a/gr-digital/examples/narrowband/benchmark_add_channel.py b/gr-digital/examples/narrowband/benchmark_add_channel.py
index 841833a08f..8f2e544fdb 100755
--- a/gr-digital/examples/narrowband/benchmark_add_channel.py
+++ b/gr-digital/examples/narrowband/benchmark_add_channel.py
@@ -20,7 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr
+from gnuradio import gr, filter
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
from optparse import OptionParser
@@ -43,8 +43,8 @@ class my_top_block(gr.top_block):
self.src = gr.file_source(gr.sizeof_gr_complex, ifile)
#self.throttle = gr.throttle(gr.sizeof_gr_complex, options.sample_rate)
- self.channel = gr.channel_model(noise_voltage, frequency_offset,
- time_offset, noise_seed=random.randint(0,100000))
+ self.channel = filter.channel_model(noise_voltage, frequency_offset,
+ time_offset, noise_seed=random.randint(0,100000))
self.phase = gr.multiply_const_cc(complex(math.cos(phase_offset),
math.sin(phase_offset)))
self.snk = gr.file_sink(gr.sizeof_gr_complex, ofile)
diff --git a/gr-digital/examples/narrowband/receive_path.py b/gr-digital/examples/narrowband/receive_path.py
index 1f93105068..9aa6dc488d 100644
--- a/gr-digital/examples/narrowband/receive_path.py
+++ b/gr-digital/examples/narrowband/receive_path.py
@@ -20,7 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, gru
+from gnuradio import gr, gru, filter
from gnuradio import eng_notation
from gnuradio import digital
@@ -61,12 +61,12 @@ class receive_path(gr.hier_block2):
# Design filter to get actual channel we want
sw_decim = 1
- chan_coeffs = gr.firdes.low_pass (1.0, # gain
- sw_decim * self.samples_per_symbol(), # sampling rate
- self._chbw_factor, # midpoint of trans. band
- 0.5, # width of trans. band
- gr.firdes.WIN_HANN) # filter type
- self.channel_filter = gr.fft_filter_ccc(sw_decim, chan_coeffs)
+ chan_coeffs = filter.firdes.low_pass(1.0, # gain
+ sw_decim * self.samples_per_symbol(), # sampling rate
+ self._chbw_factor, # midpoint of trans. band
+ 0.5, # width of trans. band
+ gr.firdes.WIN_HANN) # filter type
+ self.channel_filter = filter.fft_filter_ccc(sw_decim, chan_coeffs)
# receiver
self.packet_receiver = \
diff --git a/gr-digital/examples/snr_estimators.py b/gr-digital/examples/snr_estimators.py
index 432abd4553..0603da131d 100755
--- a/gr-digital/examples/snr_estimators.py
+++ b/gr-digital/examples/snr_estimators.py
@@ -15,7 +15,7 @@ except ImportError:
print "Error: Program requires Matplotlib (matplotlib.sourceforge.net)."
sys.exit(1)
-from gnuradio import gr, digital
+from gnuradio import gr, digital, filter
from optparse import OptionParser
from gnuradio.eng_option import eng_option
@@ -147,7 +147,7 @@ def main():
gr_src = gr.vector_source_c(bits.tolist(), False)
gr_snr = digital.mpsk_snr_est_cc(gr_est, ntag, 0.001)
- gr_chn = gr.channel_model(1.0/scale)
+ gr_chn = filter.channel_model(1.0/scale)
gr_snk = gr.null_sink(gr.sizeof_gr_complex)
tb = gr.top_block()
tb.connect(gr_src, gr_chn, gr_snr, gr_snk)