summaryrefslogtreecommitdiff
path: root/gr-trellis/src/examples/python/test_sccc_turbo.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-trellis/src/examples/python/test_sccc_turbo.py')
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_turbo.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/gr-trellis/src/examples/python/test_sccc_turbo.py b/gr-trellis/src/examples/python/test_sccc_turbo.py
index e8054a08b2..979dfeca59 100755
--- a/gr-trellis/src/examples/python/test_sccc_turbo.py
+++ b/gr-trellis/src/examples/python/test_sccc_turbo.py
@@ -8,7 +8,11 @@ import sys
import random
import fsm_utils
-
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
def make_rx(tb,fo,fi,dimensionality,constellation,K,interleaver,IT,Es,N0,type):
metrics_in = trellis.metrics_f(fi.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner Viterbi
@@ -65,7 +69,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
(head,tail) = make_rx(tb,fo,fi,dimensionality,constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)