summaryrefslogtreecommitdiff
path: root/gr-trellis/src/examples/python/test_sccc_turbo1.py
diff options
context:
space:
mode:
authorTom Rondeau2012-04-13 18:36:53 -0400
committerTom Rondeau2012-04-13 18:36:53 -0400
commitf919f9dcbb54a08e6e26d6c229ce92fb784fa1b2 (patch)
tree7e846386b9eb1676f9a93fc4a1e55916b9accc97 /gr-trellis/src/examples/python/test_sccc_turbo1.py
parent6a1e9783fec6ed827f49db27c171591d30f32933 (diff)
downloadgnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.tar.gz
gnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.tar.bz2
gnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.zip
Removed whitespace and added dtools/bin/remove-whitespace as a tool to do this in the future.
The sed script was provided by Moritz Fischer.
Diffstat (limited to 'gr-trellis/src/examples/python/test_sccc_turbo1.py')
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_turbo1.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gr-trellis/src/examples/python/test_sccc_turbo1.py b/gr-trellis/src/examples/python/test_sccc_turbo1.py
index ad2ed6bf9..187a75185 100755
--- a/gr-trellis/src/examples/python/test_sccc_turbo1.py
+++ b/gr-trellis/src/examples/python/test_sccc_turbo1.py
@@ -27,7 +27,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
dec = trellis.sccc_decoder_combined_fs(fo,0,-1,fi,0,-1,interleaver,K,IT,trellis.TRELLIS_MIN_SUM,dimensionality,constellation,digital.TRELLIS_EUCLIDEAN,1.0)
fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
dst = gr.check_lfsr_32k_s()
-
+
#tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod)
tb.connect (src,src_head,s2fsmi,enc,mod)
tb.connect (mod,(add,0))
@@ -37,9 +37,9 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
tb.connect (add,dec,fsmi2s,dst)
tb.run()
-
+
#print enc_out.ST(), enc_in.ST()
-
+
ntotal = dst.ntotal ()
nright = dst.nright ()
runlength = dst.runlength ()
@@ -70,7 +70,7 @@ def main(args):
interleaver=trellis.interleaver(K,666) # construct a random interleaver
modulation = fsm_utils.psk8 # see fsm_utlis.py for available predefined modulations
dimensionality = modulation[0]
- constellation = modulation[1]
+ constellation = modulation[1]
if len(constellation)/dimensionality != fi.O():
sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n')
sys.exit (1)
@@ -80,7 +80,7 @@ def main(args):
Es = Es + constellation[i]**2
Es = Es / (len(constellation)/dimensionality)
N0=Es/pow(10.0,esn0_db/10.0); # calculate noise variance
-
+
tot_s=0 # total number of transmitted shorts
terr_s=0 # total number of shorts in error
terr_p=0 # total number of packets in error