summaryrefslogtreecommitdiff
path: root/gr-trellis/src/examples/python
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
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')
-rw-r--r--gr-trellis/src/examples/python/README8
-rw-r--r--gr-trellis/src/examples/python/fsm_files/awgn1o2_128.fsm512
-rw-r--r--gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msb.fsm2
-rw-r--r--gr-trellis/src/examples/python/fsm_files/joint_16_16.fsm1024
-rw-r--r--gr-trellis/src/examples/python/fsm_files/joint_4_16.fsm256
-rwxr-xr-xgr-trellis/src/examples/python/fsm_utils.py14
-rwxr-xr-xgr-trellis/src/examples/python/test_cpm.py4
-rwxr-xr-xgr-trellis/src/examples/python/test_pccc_turbo1.py10
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_hard.py8
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_soft.py8
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_turbo.py10
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_turbo1.py10
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_turbo2.py10
-rwxr-xr-xgr-trellis/src/examples/python/test_tcm.py16
-rwxr-xr-xgr-trellis/src/examples/python/test_tcm_bit.py18
-rwxr-xr-xgr-trellis/src/examples/python/test_tcm_combined.py16
-rwxr-xr-xgr-trellis/src/examples/python/test_tcm_parallel.py8
-rwxr-xr-xgr-trellis/src/examples/python/test_turbo_equalization.py16
-rwxr-xr-xgr-trellis/src/examples/python/test_turbo_equalization1.py12
-rwxr-xr-xgr-trellis/src/examples/python/test_turbo_equalization2.py14
-rwxr-xr-xgr-trellis/src/examples/python/test_viterbi_equalization.py12
-rwxr-xr-xgr-trellis/src/examples/python/test_viterbi_equalization1.py6
22 files changed, 997 insertions, 997 deletions
diff --git a/gr-trellis/src/examples/python/README b/gr-trellis/src/examples/python/README
index bd28e3d61..d51f231ac 100644
--- a/gr-trellis/src/examples/python/README
+++ b/gr-trellis/src/examples/python/README
@@ -1,5 +1,5 @@
Here we have several test programs for use with the gr-trellis implementation.
-Documentation can be found in
+Documentation can be found in
http://gnuradio.utah.edu/svn/gnuradio/trunk/gr-trellis/doc/gr-trellis.html
fsm_utils.py contains several useful functions.
@@ -28,8 +28,8 @@ number of packets in error
estimated packet error rate
number of transmitted shorts (or symbols, or bits, depending on the specific program)
number of shorts (or symbols, or bits) in error
-estimated short (or symbol, or bit) error rate
+estimated short (or symbol, or bit) error rate
-for instance, the final number 1.10e-03 is the error rate estimate by sending 1000
-packets of 1024 shorts each, using an 1/2 4-state convolutional code
+for instance, the final number 1.10e-03 is the error rate estimate by sending 1000
+packets of 1024 shorts each, using an 1/2 4-state convolutional code
and QPSK modulation through an AWGN with Es/N0 = 6.0 dB
diff --git a/gr-trellis/src/examples/python/fsm_files/awgn1o2_128.fsm b/gr-trellis/src/examples/python/fsm_files/awgn1o2_128.fsm
index bb79c59da..4b47007c5 100644
--- a/gr-trellis/src/examples/python/fsm_files/awgn1o2_128.fsm
+++ b/gr-trellis/src/examples/python/fsm_files/awgn1o2_128.fsm
@@ -1,262 +1,262 @@
2 128 4
-0 64
-0 64
-1 65
-1 65
-2 66
-2 66
-3 67
-3 67
-4 68
-4 68
-5 69
-5 69
-6 70
-6 70
-7 71
-7 71
-8 72
-8 72
-9 73
-9 73
-10 74
-10 74
-11 75
-11 75
-12 76
-12 76
-13 77
-13 77
-14 78
-14 78
-15 79
-15 79
-16 80
-16 80
-17 81
-17 81
-18 82
-18 82
-19 83
-19 83
-20 84
-20 84
-21 85
-21 85
-22 86
-22 86
-23 87
-23 87
-24 88
-24 88
-25 89
-25 89
-26 90
-26 90
-27 91
-27 91
-28 92
-28 92
-29 93
-29 93
-30 94
-30 94
-31 95
-31 95
-32 96
-32 96
-33 97
-33 97
-34 98
-34 98
-35 99
-35 99
-36 100
-36 100
-37 101
-37 101
-38 102
-38 102
-39 103
-39 103
-40 104
-40 104
-41 105
-41 105
-42 106
-42 106
-43 107
-43 107
-44 108
-44 108
-45 109
-45 109
-46 110
-46 110
-47 111
-47 111
-48 112
-48 112
-49 113
-49 113
-50 114
-50 114
-51 115
-51 115
-52 116
-52 116
-53 117
-53 117
-54 118
-54 118
-55 119
-55 119
-56 120
-56 120
-57 121
-57 121
-58 122
-58 122
-59 123
-59 123
-60 124
-60 124
-61 125
-61 125
-62 126
-62 126
-63 127
-63 127
+0 64
+0 64
+1 65
+1 65
+2 66
+2 66
+3 67
+3 67
+4 68
+4 68
+5 69
+5 69
+6 70
+6 70
+7 71
+7 71
+8 72
+8 72
+9 73
+9 73
+10 74
+10 74
+11 75
+11 75
+12 76
+12 76
+13 77
+13 77
+14 78
+14 78
+15 79
+15 79
+16 80
+16 80
+17 81
+17 81
+18 82
+18 82
+19 83
+19 83
+20 84
+20 84
+21 85
+21 85
+22 86
+22 86
+23 87
+23 87
+24 88
+24 88
+25 89
+25 89
+26 90
+26 90
+27 91
+27 91
+28 92
+28 92
+29 93
+29 93
+30 94
+30 94
+31 95
+31 95
+32 96
+32 96
+33 97
+33 97
+34 98
+34 98
+35 99
+35 99
+36 100
+36 100
+37 101
+37 101
+38 102
+38 102
+39 103
+39 103
+40 104
+40 104
+41 105
+41 105
+42 106
+42 106
+43 107
+43 107
+44 108
+44 108
+45 109
+45 109
+46 110
+46 110
+47 111
+47 111
+48 112
+48 112
+49 113
+49 113
+50 114
+50 114
+51 115
+51 115
+52 116
+52 116
+53 117
+53 117
+54 118
+54 118
+55 119
+55 119
+56 120
+56 120
+57 121
+57 121
+58 122
+58 122
+59 123
+59 123
+60 124
+60 124
+61 125
+61 125
+62 126
+62 126
+63 127
+63 127
-0 3
-3 0
-1 2
-2 1
-3 0
-0 3
-2 1
-1 2
-1 2
-2 1
-0 3
-3 0
-2 1
-1 2
-3 0
-0 3
-1 2
-2 1
-0 3
-3 0
-2 1
-1 2
-3 0
-0 3
-0 3
-3 0
-1 2
-2 1
-3 0
-0 3
-2 1
-1 2
-2 1
-1 2
-3 0
-0 3
-1 2
-2 1
-0 3
-3 0
-3 0
-0 3
-2 1
-1 2
-0 3
-3 0
-1 2
-2 1
-3 0
-0 3
-2 1
-1 2
-0 3
-3 0
-1 2
-2 1
-2 1
-1 2
-3 0
-0 3
-1 2
-2 1
-0 3
-3 0
-2 1
-1 2
-3 0
-0 3
-1 2
-2 1
-0 3
-3 0
-3 0
-0 3
-2 1
-1 2
-0 3
-3 0
-1 2
-2 1
-3 0
-0 3
-2 1
-1 2
-0 3
-3 0
-1 2
-2 1
-2 1
-1 2
-3 0
-0 3
-1 2
-2 1
-0 3
-3 0
-0 3
-3 0
-1 2
-2 1
-3 0
-0 3
-2 1
-1 2
-1 2
-2 1
-0 3
-3 0
-2 1
-1 2
-3 0
-0 3
-1 2
-2 1
-0 3
-3 0
-2 1
-1 2
-3 0
-0 3
-0 3
-3 0
-1 2
-2 1
-3 0
-0 3
-2 1
-1 2
+0 3
+3 0
+1 2
+2 1
+3 0
+0 3
+2 1
+1 2
+1 2
+2 1
+0 3
+3 0
+2 1
+1 2
+3 0
+0 3
+1 2
+2 1
+0 3
+3 0
+2 1
+1 2
+3 0
+0 3
+0 3
+3 0
+1 2
+2 1
+3 0
+0 3
+2 1
+1 2
+2 1
+1 2
+3 0
+0 3
+1 2
+2 1
+0 3
+3 0
+3 0
+0 3
+2 1
+1 2
+0 3
+3 0
+1 2
+2 1
+3 0
+0 3
+2 1
+1 2
+0 3
+3 0
+1 2
+2 1
+2 1
+1 2
+3 0
+0 3
+1 2
+2 1
+0 3
+3 0
+2 1
+1 2
+3 0
+0 3
+1 2
+2 1
+0 3
+3 0
+3 0
+0 3
+2 1
+1 2
+0 3
+3 0
+1 2
+2 1
+3 0
+0 3
+2 1
+1 2
+0 3
+3 0
+1 2
+2 1
+2 1
+1 2
+3 0
+0 3
+1 2
+2 1
+0 3
+3 0
+0 3
+3 0
+1 2
+2 1
+3 0
+0 3
+2 1
+1 2
+1 2
+2 1
+0 3
+3 0
+2 1
+1 2
+3 0
+0 3
+1 2
+2 1
+0 3
+3 0
+2 1
+1 2
+3 0
+0 3
+0 3
+3 0
+1 2
+2 1
+3 0
+0 3
+2 1
+1 2
diff --git a/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msb.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msb.fsm
index 551b71101..d834c5271 100644
--- a/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msb.fsm
+++ b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msb.fsm
@@ -8,7 +8,7 @@
0 5 3 6
4 1 7 2
7 2 4 1
-3 6 0 5
+3 6 0 5
This is generated by the 1/2 AWGN code (5 7) operated twice, ie,
diff --git a/gr-trellis/src/examples/python/fsm_files/joint_16_16.fsm b/gr-trellis/src/examples/python/fsm_files/joint_16_16.fsm
index 3dae314b6..293ff4e7c 100644
--- a/gr-trellis/src/examples/python/fsm_files/joint_16_16.fsm
+++ b/gr-trellis/src/examples/python/fsm_files/joint_16_16.fsm
@@ -1,518 +1,518 @@
4 256 16
-0 8 128 136
-0 8 128 136
-1 9 129 137
-1 9 129 137
-2 10 130 138
-2 10 130 138
-3 11 131 139
-3 11 131 139
-4 12 132 140
-4 12 132 140
-5 13 133 141
-5 13 133 141
-6 14 134 142
-6 14 134 142
-7 15 135 143
-7 15 135 143
-0 8 128 136
-0 8 128 136
-1 9 129 137
-1 9 129 137
-2 10 130 138
-2 10 130 138
-3 11 131 139
-3 11 131 139
-4 12 132 140
-4 12 132 140
-5 13 133 141
-5 13 133 141
-6 14 134 142
-6 14 134 142
-7 15 135 143
-7 15 135 143
-16 24 144 152
-16 24 144 152
-17 25 145 153
-17 25 145 153
-18 26 146 154
-18 26 146 154
-19 27 147 155
-19 27 147 155
-20 28 148 156
-20 28 148 156
-21 29 149 157
-21 29 149 157
-22 30 150 158
-22 30 150 158
-23 31 151 159
-23 31 151 159
-16 24 144 152
-16 24 144 152
-17 25 145 153
-17 25 145 153
-18 26 146 154
-18 26 146 154
-19 27 147 155
-19 27 147 155
-20 28 148 156
-20 28 148 156
-21 29 149 157
-21 29 149 157
-22 30 150 158
-22 30 150 158
-23 31 151 159
-23 31 151 159
-32 40 160 168
-32 40 160 168
-33 41 161 169
-33 41 161 169
-34 42 162 170
-34 42 162 170
-35 43 163 171
-35 43 163 171
-36 44 164 172
-36 44 164 172
-37 45 165 173
-37 45 165 173
-38 46 166 174
-38 46 166 174
-39 47 167 175
-39 47 167 175
-32 40 160 168
-32 40 160 168
-33 41 161 169
-33 41 161 169
-34 42 162 170
-34 42 162 170
-35 43 163 171
-35 43 163 171
-36 44 164 172
-36 44 164 172
-37 45 165 173
-37 45 165 173
-38 46 166 174
-38 46 166 174
-39 47 167 175
-39 47 167 175
-48 56 176 184
-48 56 176 184
-49 57 177 185
-49 57 177 185
-50 58 178 186
-50 58 178 186
-51 59 179 187
-51 59 179 187
-52 60 180 188
-52 60 180 188
-53 61 181 189
-53 61 181 189
-54 62 182 190
-54 62 182 190
-55 63 183 191
-55 63 183 191
-48 56 176 184
-48 56 176 184
-49 57 177 185
-49 57 177 185
-50 58 178 186
-50 58 178 186
-51 59 179 187
-51 59 179 187
-52 60 180 188
-52 60 180 188
-53 61 181 189
-53 61 181 189
-54 62 182 190
-54 62 182 190
-55 63 183 191
-55 63 183 191
-64 72 192 200
-64 72 192 200
-65 73 193 201
-65 73 193 201
-66 74 194 202
-66 74 194 202
-67 75 195 203
-67 75 195 203
-68 76 196 204
-68 76 196 204
-69 77 197 205
-69 77 197 205
-70 78 198 206
-70 78 198 206
-71 79 199 207
-71 79 199 207
-64 72 192 200
-64 72 192 200
-65 73 193 201
-65 73 193 201
-66 74 194 202
-66 74 194 202
-67 75 195 203
-67 75 195 203
-68 76 196 204
-68 76 196 204
-69 77 197 205
-69 77 197 205
-70 78 198 206
-70 78 198 206
-71 79 199 207
-71 79 199 207
-80 88 208 216
-80 88 208 216
-81 89 209 217
-81 89 209 217
-82 90 210 218
-82 90 210 218
-83 91 211 219
-83 91 211 219
-84 92 212 220
-84 92 212 220
-85 93 213 221
-85 93 213 221
-86 94 214 222
-86 94 214 222
-87 95 215 223
-87 95 215 223
-80 88 208 216
-80 88 208 216
-81 89 209 217
-81 89 209 217
-82 90 210 218
-82 90 210 218
-83 91 211 219
-83 91 211 219
-84 92 212 220
-84 92 212 220
-85 93 213 221
-85 93 213 221
-86 94 214 222
-86 94 214 222
-87 95 215 223
-87 95 215 223
-96 104 224 232
-96 104 224 232
-97 105 225 233
-97 105 225 233
-98 106 226 234
-98 106 226 234
-99 107 227 235
-99 107 227 235
-100 108 228 236
-100 108 228 236
-101 109 229 237
-101 109 229 237
-102 110 230 238
-102 110 230 238
-103 111 231 239
-103 111 231 239
-96 104 224 232
-96 104 224 232
-97 105 225 233
-97 105 225 233
-98 106 226 234
-98 106 226 234
-99 107 227 235
-99 107 227 235
-100 108 228 236
-100 108 228 236
-101 109 229 237
-101 109 229 237
-102 110 230 238
-102 110 230 238
-103 111 231 239
-103 111 231 239
-112 120 240 248
-112 120 240 248
-113 121 241 249
-113 121 241 249
-114 122 242 250
-114 122 242 250
-115 123 243 251
-115 123 243 251
-116 124 244 252
-116 124 244 252
-117 125 245 253
-117 125 245 253
-118 126 246 254
-118 126 246 254
-119 127 247 255
-119 127 247 255
-112 120 240 248
-112 120 240 248
-113 121 241 249
-113 121 241 249
-114 122 242 250
-114 122 242 250
-115 123 243 251
-115 123 243 251
-116 124 244 252
-116 124 244 252
-117 125 245 253
-117 125 245 253
-118 126 246 254
-118 126 246 254
-119 127 247 255
-119 127 247 255
+0 8 128 136
+0 8 128 136
+1 9 129 137
+1 9 129 137
+2 10 130 138
+2 10 130 138
+3 11 131 139
+3 11 131 139
+4 12 132 140
+4 12 132 140
+5 13 133 141
+5 13 133 141
+6 14 134 142
+6 14 134 142
+7 15 135 143
+7 15 135 143
+0 8 128 136
+0 8 128 136
+1 9 129 137
+1 9 129 137
+2 10 130 138
+2 10 130 138
+3 11 131 139
+3 11 131 139
+4 12 132 140
+4 12 132 140
+5 13 133 141
+5 13 133 141
+6 14 134 142
+6 14 134 142
+7 15 135 143
+7 15 135 143
+16 24 144 152
+16 24 144 152
+17 25 145 153
+17 25 145 153
+18 26 146 154
+18 26 146 154
+19 27 147 155
+19 27 147 155
+20 28 148 156
+20 28 148 156
+21 29 149 157
+21 29 149 157
+22 30 150 158
+22 30 150 158
+23 31 151 159
+23 31 151 159
+16 24 144 152
+16 24 144 152
+17 25 145 153
+17 25 145 153
+18 26 146 154
+18 26 146 154
+19 27 147 155
+19 27 147 155
+20 28 148 156
+20 28 148 156
+21 29 149 157
+21 29 149 157
+22 30 150 158
+22 30 150 158
+23 31 151 159
+23 31 151 159
+32 40 160 168
+32 40 160 168
+33 41 161 169
+33 41 161 169
+34 42 162 170
+34 42 162 170
+35 43 163 171
+35 43 163 171
+36 44 164 172
+36 44 164 172
+37 45 165 173
+37 45 165 173
+38 46 166 174
+38 46 166 174
+39 47 167 175
+39 47 167 175
+32 40 160 168
+32 40 160 168
+33 41 161 169
+33 41 161 169
+34 42 162 170
+34 42 162 170
+35 43 163 171
+35 43 163 171
+36 44 164 172
+36 44 164 172
+37 45 165 173
+37 45 165 173
+38 46 166 174
+38 46 166 174
+39 47 167 175
+39 47 167 175
+48 56 176 184
+48 56 176 184
+49 57 177 185
+49 57 177 185
+50 58 178 186
+50 58 178 186
+51 59 179 187
+51 59 179 187
+52 60 180 188
+52 60 180 188
+53 61 181 189
+53 61 181 189
+54 62 182 190
+54 62 182 190
+55 63 183 191
+55 63 183 191
+48 56 176 184
+48 56 176 184
+49 57 177 185
+49 57 177 185
+50 58 178 186
+50 58 178 186
+51 59 179 187
+51 59 179 187
+52 60 180 188
+52 60 180 188
+53 61 181 189
+53 61 181 189
+54 62 182 190
+54 62 182 190
+55 63 183 191
+55 63 183 191
+64 72 192 200
+64 72 192 200
+65 73 193 201
+65 73 193 201
+66 74 194 202
+66 74 194 202
+67 75 195 203
+67 75 195 203
+68 76 196 204
+68 76 196 204
+69 77 197 205
+69 77 197 205
+70 78 198 206
+70 78 198 206
+71 79 199 207
+71 79 199 207
+64 72 192 200
+64 72 192 200
+65 73 193 201
+65 73 193 201
+66 74 194 202
+66 74 194 202
+67 75 195 203
+67 75 195 203
+68 76 196 204
+68 76 196 204
+69 77 197 205
+69 77 197 205
+70 78 198 206
+70 78 198 206
+71 79 199 207
+71 79 199 207
+80 88 208 216
+80 88 208 216
+81 89 209 217
+81 89 209 217
+82 90 210 218
+82 90 210 218
+83 91 211 219
+83 91 211 219
+84 92 212 220
+84 92 212 220
+85 93 213 221
+85 93 213 221
+86 94 214 222
+86 94 214 222
+87 95 215 223
+87 95 215 223
+80 88 208 216
+80 88 208 216
+81 89 209 217
+81 89 209 217
+82 90 210 218
+82 90 210 218
+83 91 211 219
+83 91 211 219
+84 92 212 220
+84 92 212 220
+85 93 213 221
+85 93 213 221
+86 94 214 222
+86 94 214 222
+87 95 215 223
+87 95 215 223
+96 104 224 232
+96 104 224 232
+97 105 225 233
+97 105 225 233
+98 106 226 234
+98 106 226 234
+99 107 227 235
+99 107 227 235
+100 108 228 236
+100 108 228 236
+101 109 229 237
+101 109 229 237
+102 110 230 238
+102 110 230 238
+103 111 231 239
+103 111 231 239
+96 104 224 232
+96 104 224 232
+97 105 225 233
+97 105 225 233
+98 106 226 234
+98 106 226 234
+99 107 227 235
+99 107 227 235
+100 108 228 236
+100 108 228 236
+101 109 229 237
+101 109 229 237
+102 110 230 238
+102 110 230 238
+103 111 231 239
+103 111 231 239
+112 120 240 248
+112 120 240 248
+113 121 241 249
+113 121 241 249
+114 122 242 250
+114 122 242 250
+115 123 243 251
+115 123 243 251
+116 124 244 252
+116 124 244 252
+117 125 245 253
+117 125 245 253
+118 126 246 254
+118 126 246 254
+119 127 247 255
+119 127 247 255
+112 120 240 248
+112 120 240 248
+113 121 241 249
+113 121 241 249
+114 122 242 250
+114 122 242 250
+115 123 243 251
+115 123 243 251
+116 124 244 252
+116 124 244 252
+117 125 245 253
+117 125 245 253
+118 126 246 254
+118 126 246 254
+119 127 247 255
+119 127 247 255
-0 3 12 15
-3 0 15 12
-1 2 13 14
-2 1 14 13
-1 2 13 14
-2 1 14 13
-0 3 12 15
-3 0 15 12
-2 1 14 13
-1 2 13 14
-3 0 15 12
-0 3 12 15
-3 0 15 12
-0 3 12 15
-2 1 14 13
-1 2 13 14
-12 15 0 3
-15 12 3 0
-13 14 1 2
-14 13 2 1
-13 14 1 2
-14 13 2 1
-12 15 0 3
-15 12 3 0
-14 13 2 1
-13 14 1 2
-15 12 3 0
-12 15 0 3
-15 12 3 0
-12 15 0 3
-14 13 2 1
-13 14 1 2
-4 7 8 11
-7 4 11 8
-5 6 9 10
-6 5 10 9
-5 6 9 10
-6 5 10 9
-4 7 8 11
-7 4 11 8
-6 5 10 9
-5 6 9 10
-7 4 11 8
-4 7 8 11
-7 4 11 8
-4 7 8 11
-6 5 10 9
-5 6 9 10
-8 11 4 7
-11 8 7 4
-9 10 5 6
-10 9 6 5
-9 10 5 6
-10 9 6 5
-8 11 4 7
-11 8 7 4
-10 9 6 5
-9 10 5 6
-11 8 7 4
-8 11 4 7
-11 8 7 4
-8 11 4 7
-10 9 6 5
-9 10 5 6
-4 7 8 11
-7 4 11 8
-5 6 9 10
-6 5 10 9
-5 6 9 10
-6 5 10 9
-4 7 8 11
-7 4 11 8
-6 5 10 9
-5 6 9 10
-7 4 11 8
-4 7 8 11
-7 4 11 8
-4 7 8 11
-6 5 10 9
-5 6 9 10
-8 11 4 7
-11 8 7 4
-9 10 5 6
-10 9 6 5
-9 10 5 6
-10 9 6 5
-8 11 4 7
-11 8 7 4
-10 9 6 5
-9 10 5 6
-11 8 7 4
-8 11 4 7
-11 8 7 4
-8 11 4 7
-10 9 6 5
-9 10 5 6
-0 3 12 15
-3 0 15 12
-1 2 13 14
-2 1 14 13
-1 2 13 14
-2 1 14 13
-0 3 12 15
-3 0 15 12
-2 1 14 13
-1 2 13 14
-3 0 15 12
-0 3 12 15
-3 0 15 12
-0 3 12 15
-2 1 14 13
-1 2 13 14
-12 15 0 3
-15 12 3 0
-13 14 1 2
-14 13 2 1
-13 14 1 2
-14 13 2 1
-12 15 0 3
-15 12 3 0
-14 13 2 1
-13 14 1 2
-15 12 3 0
-12 15 0 3
-15 12 3 0
-12 15 0 3
-14 13 2 1
-13 14 1 2
-8 11 4 7
-11 8 7 4
-9 10 5 6
-10 9 6 5
-9 10 5 6
-10 9 6 5
-8 11 4 7
-11 8 7 4
-10 9 6 5
-9 10 5 6
-11 8 7 4
-8 11 4 7
-11 8 7 4
-8 11 4 7
-10 9 6 5
-9 10 5 6
-4 7 8 11
-7 4 11 8
-5 6 9 10
-6 5 10 9
-5 6 9 10
-6 5 10 9
-4 7 8 11
-7 4 11 8
-6 5 10 9
-5 6 9 10
-7 4 11 8
-4 7 8 11
-7 4 11 8
-4 7 8 11
-6 5 10 9
-5 6 9 10
-12 15 0 3
-15 12 3 0
-13 14 1 2
-14 13 2 1
-13 14 1 2
-14 13 2 1
-12 15 0 3
-15 12 3 0
-14 13 2 1
-13 14 1 2
-15 12 3 0
-12 15 0 3
-15 12 3 0
-12 15 0 3
-14 13 2 1
-13 14 1 2
-0 3 12 15
-3 0 15 12
-1 2 13 14
-2 1 14 13
-1 2 13 14
-2 1 14 13
-0 3 12 15
-3 0 15 12
-2 1 14 13
-1 2 13 14
-3 0 15 12
-0 3 12 15
-3 0 15 12
-0 3 12 15
-2 1 14 13
-1 2 13 14
-12 15 0 3
-15 12 3 0
-13 14 1 2
-14 13 2 1
-13 14 1 2
-14 13 2 1
-12 15 0 3
-15 12 3 0
-14 13 2 1
-13 14 1 2
-15 12 3 0
-12 15 0 3
-15 12 3 0
-12 15 0 3
-14 13 2 1
-13 14 1 2
-0 3 12 15
-3 0 15 12
-1 2 13 14
-2 1 14 13
-1 2 13 14
-2 1 14 13
-0 3 12 15
-3 0 15 12
-2 1 14 13
-1 2 13 14
-3 0 15 12
-0 3 12 15
-3 0 15 12
-0 3 12 15
-2 1 14 13
-1 2 13 14
-8 11 4 7
-11 8 7 4
-9 10 5 6
-10 9 6 5
-9 10 5 6
-10 9 6 5
-8 11 4 7
-11 8 7 4
-10 9 6 5
-9 10 5 6
-11 8 7 4
-8 11 4 7
-11 8 7 4
-8 11 4 7
-10 9 6 5
-9 10 5 6
-4 7 8 11
-7 4 11 8
-5 6 9 10
-6 5 10 9
-5 6 9 10
-6 5 10 9
-4 7 8 11
-7 4 11 8
-6 5 10 9
-5 6 9 10
-7 4 11 8
-4 7 8 11
-7 4 11 8
-4 7 8 11
-6 5 10 9
-5 6 9 10
+0 3 12 15
+3 0 15 12
+1 2 13 14
+2 1 14 13
+1 2 13 14
+2 1 14 13
+0 3 12 15
+3 0 15 12
+2 1 14 13
+1 2 13 14
+3 0 15 12
+0 3 12 15
+3 0 15 12
+0 3 12 15
+2 1 14 13
+1 2 13 14
+12 15 0 3
+15 12 3 0
+13 14 1 2
+14 13 2 1
+13 14 1 2
+14 13 2 1
+12 15 0 3
+15 12 3 0
+14 13 2 1
+13 14 1 2
+15 12 3 0
+12 15 0 3
+15 12 3 0
+12 15 0 3
+14 13 2 1
+13 14 1 2
+4 7 8 11
+7 4 11 8
+5 6 9 10
+6 5 10 9
+5 6 9 10
+6 5 10 9
+4 7 8 11
+7 4 11 8
+6 5 10 9
+5 6 9 10
+7 4 11 8
+4 7 8 11
+7 4 11 8
+4 7 8 11
+6 5 10 9
+5 6 9 10
+8 11 4 7
+11 8 7 4
+9 10 5 6
+10 9 6 5
+9 10 5 6
+10 9 6 5
+8 11 4 7
+11 8 7 4
+10 9 6 5
+9 10 5 6
+11 8 7 4
+8 11 4 7
+11 8 7 4
+8 11 4 7
+10 9 6 5
+9 10 5 6
+4 7 8 11
+7 4 11 8
+5 6 9 10
+6 5 10 9
+5 6 9 10
+6 5 10 9
+4 7 8 11
+7 4 11 8
+6 5 10 9
+5 6 9 10
+7 4 11 8
+4 7 8 11
+7 4 11 8
+4 7 8 11
+6 5 10 9
+5 6 9 10
+8 11 4 7
+11 8 7 4
+9 10 5 6
+10 9 6 5
+9 10 5 6
+10 9 6 5
+8 11 4 7
+11 8 7 4
+10 9 6 5
+9 10 5 6
+11 8 7 4
+8 11 4 7
+11 8 7 4
+8 11 4 7
+10 9 6 5
+9 10 5 6
+0 3 12 15
+3 0 15 12
+1 2 13 14
+2 1 14 13
+1 2 13 14
+2 1 14 13
+0 3 12 15
+3 0 15 12
+2 1 14 13
+1 2 13 14
+3 0 15 12
+0 3 12 15
+3 0 15 12
+0 3 12 15
+2 1 14 13
+1 2 13 14
+12 15 0 3
+15 12 3 0
+13 14 1 2
+14 13 2 1
+13 14 1 2
+14 13 2 1
+12 15 0 3
+15 12 3 0
+14 13 2 1
+13 14 1 2
+15 12 3 0
+12 15 0 3
+15 12 3 0
+12 15 0 3
+14 13 2 1
+13 14 1 2
+8 11 4 7
+11 8 7 4
+9 10 5 6
+10 9 6 5
+9 10 5 6
+10 9 6 5
+8 11 4 7
+11 8 7 4
+10 9 6 5
+9 10 5 6
+11 8 7 4
+8 11 4 7
+11 8 7 4
+8 11 4 7
+10 9 6 5
+9 10 5 6
+4 7 8 11
+7 4 11 8
+5 6 9 10
+6 5 10 9
+5 6 9 10
+6 5 10 9
+4 7 8 11
+7 4 11 8
+6 5 10 9
+5 6 9 10
+7 4 11 8
+4 7 8 11
+7 4 11 8
+4 7 8 11
+6 5 10 9
+5 6 9 10
+12 15 0 3
+15 12 3 0
+13 14 1 2
+14 13 2 1
+13 14 1 2
+14 13 2 1
+12 15 0 3
+15 12 3 0
+14 13 2 1
+13 14 1 2
+15 12 3 0
+12 15 0 3
+15 12 3 0
+12 15 0 3
+14 13 2 1
+13 14 1 2
+0 3 12 15
+3 0 15 12
+1 2 13 14
+2 1 14 13
+1 2 13 14
+2 1 14 13
+0 3 12 15
+3 0 15 12
+2 1 14 13
+1 2 13 14
+3 0 15 12
+0 3 12 15
+3 0 15 12
+0 3 12 15
+2 1 14 13
+1 2 13 14
+12 15 0 3
+15 12 3 0
+13 14 1 2
+14 13 2 1
+13 14 1 2
+14 13 2 1
+12 15 0 3
+15 12 3 0
+14 13 2 1
+13 14 1 2
+15 12 3 0
+12 15 0 3
+15 12 3 0
+12 15 0 3
+14 13 2 1
+13 14 1 2
+0 3 12 15
+3 0 15 12
+1 2 13 14
+2 1 14 13
+1 2 13 14
+2 1 14 13
+0 3 12 15
+3 0 15 12
+2 1 14 13
+1 2 13 14
+3 0 15 12
+0 3 12 15
+3 0 15 12
+0 3 12 15
+2 1 14 13
+1 2 13 14
+8 11 4 7
+11 8 7 4
+9 10 5 6
+10 9 6 5
+9 10 5 6
+10 9 6 5
+8 11 4 7
+11 8 7 4
+10 9 6 5
+9 10 5 6
+11 8 7 4
+8 11 4 7
+11 8 7 4
+8 11 4 7
+10 9 6 5
+9 10 5 6
+4 7 8 11
+7 4 11 8
+5 6 9 10
+6 5 10 9
+5 6 9 10
+6 5 10 9
+4 7 8 11
+7 4 11 8
+6 5 10 9
+5 6 9 10
+7 4 11 8
+4 7 8 11
+7 4 11 8
+4 7 8 11
+6 5 10 9
+5 6 9 10
This is the joint trellis of two trellises described in awgn1o2_16.fsm
It is useful for application of joint decoding...
diff --git a/gr-trellis/src/examples/python/fsm_files/joint_4_16.fsm b/gr-trellis/src/examples/python/fsm_files/joint_4_16.fsm
index 8f2cdab81..427a18207 100644
--- a/gr-trellis/src/examples/python/fsm_files/joint_4_16.fsm
+++ b/gr-trellis/src/examples/python/fsm_files/joint_4_16.fsm
@@ -1,134 +1,134 @@
4 64 16
-0 8 32 40
-0 8 32 40
-1 9 33 41
-1 9 33 41
-2 10 34 42
-2 10 34 42
-3 11 35 43
-3 11 35 43
-4 12 36 44
-4 12 36 44
-5 13 37 45
-5 13 37 45
-6 14 38 46
-6 14 38 46
-7 15 39 47
-7 15 39 47
-0 8 32 40
-0 8 32 40
-1 9 33 41
-1 9 33 41
-2 10 34 42
-2 10 34 42
-3 11 35 43
-3 11 35 43
-4 12 36 44
-4 12 36 44
-5 13 37 45
-5 13 37 45
-6 14 38 46
-6 14 38 46
-7 15 39 47
-7 15 39 47
-16 24 48 56
-16 24 48 56
-17 25 49 57
-17 25 49 57
-18 26 50 58
-18 26 50 58
-19 27 51 59
-19 27 51 59
-20 28 52 60
-20 28 52 60
-21 29 53 61
-21 29 53 61
-22 30 54 62
-22 30 54 62
-23 31 55 63
-23 31 55 63
-16 24 48 56
-16 24 48 56
-17 25 49 57
-17 25 49 57
-18 26 50 58
-18 26 50 58
-19 27 51 59
-19 27 51 59
-20 28 52 60
-20 28 52 60
-21 29 53 61
-21 29 53 61
-22 30 54 62
-22 30 54 62
-23 31 55 63
-23 31 55 63
+0 8 32 40
+0 8 32 40
+1 9 33 41
+1 9 33 41
+2 10 34 42
+2 10 34 42
+3 11 35 43
+3 11 35 43
+4 12 36 44
+4 12 36 44
+5 13 37 45
+5 13 37 45
+6 14 38 46
+6 14 38 46
+7 15 39 47
+7 15 39 47
+0 8 32 40
+0 8 32 40
+1 9 33 41
+1 9 33 41
+2 10 34 42
+2 10 34 42
+3 11 35 43
+3 11 35 43
+4 12 36 44
+4 12 36 44
+5 13 37 45
+5 13 37 45
+6 14 38 46
+6 14 38 46
+7 15 39 47
+7 15 39 47
+16 24 48 56
+16 24 48 56
+17 25 49 57
+17 25 49 57
+18 26 50 58
+18 26 50 58
+19 27 51 59
+19 27 51 59
+20 28 52 60
+20 28 52 60
+21 29 53 61
+21 29 53 61
+22 30 54 62
+22 30 54 62
+23 31 55 63
+23 31 55 63
+16 24 48 56
+16 24 48 56
+17 25 49 57
+17 25 49 57
+18 26 50 58
+18 26 50 58
+19 27 51 59
+19 27 51 59
+20 28 52 60
+20 28 52 60
+21 29 53 61
+21 29 53 61
+22 30 54 62
+22 30 54 62
+23 31 55 63
+23 31 55 63
-0 3 12 15
-3 0 15 12
-1 2 13 14
-2 1 14 13
-1 2 13 14
-2 1 14 13
-0 3 12 15
-3 0 15 12
-2 1 14 13
-1 2 13 14
-3 0 15 12
-0 3 12 15
-3 0 15 12
-0 3 12 15
-2 1 14 13
-1 2 13 14
-12 15 0 3
-15 12 3 0
-13 14 1 2
-14 13 2 1
-13 14 1 2
-14 13 2 1
-12 15 0 3
-15 12 3 0
-14 13 2 1
-13 14 1 2
-15 12 3 0
-12 15 0 3
-15 12 3 0
-12 15 0 3
-14 13 2 1
-13 14 1 2
-4 7 8 11
-7 4 11 8
-5 6 9 10
-6 5 10 9
-5 6 9 10
-6 5 10 9
-4 7 8 11
-7 4 11 8
-6 5 10 9
-5 6 9 10
-7 4 11 8
-4 7 8 11
-7 4 11 8
-4 7 8 11
-6 5 10 9
-5 6 9 10
-8 11 4 7
-11 8 7 4
-9 10 5 6
-10 9 6 5
-9 10 5 6
-10 9 6 5
-8 11 4 7
-11 8 7 4
-10 9 6 5
-9 10 5 6
-11 8 7 4
-8 11 4 7
-11 8 7 4
-8 11 4 7
-10 9 6 5
-9 10 5 6
+0 3 12 15
+3 0 15 12
+1 2 13 14
+2 1 14 13
+1 2 13 14
+2 1 14 13
+0 3 12 15
+3 0 15 12
+2 1 14 13
+1 2 13 14
+3 0 15 12
+0 3 12 15
+3 0 15 12
+0 3 12 15
+2 1 14 13
+1 2 13 14
+12 15 0 3
+15 12 3 0
+13 14 1 2
+14 13 2 1
+13 14 1 2
+14 13 2 1
+12 15 0 3
+15 12 3 0
+14 13 2 1
+13 14 1 2
+15 12 3 0
+12 15 0 3
+15 12 3 0
+12 15 0 3
+14 13 2 1
+13 14 1 2
+4 7 8 11
+7 4 11 8
+5 6 9 10
+6 5 10 9
+5 6 9 10
+6 5 10 9
+4 7 8 11
+7 4 11 8
+6 5 10 9
+5 6 9 10
+7 4 11 8
+4 7 8 11
+7 4 11 8
+4 7 8 11
+6 5 10 9
+5 6 9 10
+8 11 4 7
+11 8 7 4
+9 10 5 6
+10 9 6 5
+9 10 5 6
+10 9 6 5
+8 11 4 7
+11 8 7 4
+10 9 6 5
+9 10 5 6
+11 8 7 4
+8 11 4 7
+11 8 7 4
+8 11 4 7
+10 9 6 5
+9 10 5 6
This is the joint trellis of two trellises described in awgn1o2_4.fsm and awgn1o2_16.fsm
It is useful for application of joint decoding...
diff --git a/gr-trellis/src/examples/python/fsm_utils.py b/gr-trellis/src/examples/python/fsm_utils.py
index e9243f899..06855ea77 100755
--- a/gr-trellis/src/examples/python/fsm_utils.py
+++ b/gr-trellis/src/examples/python/fsm_utils.py
@@ -72,7 +72,7 @@ def base2dec(s,base):
# to channel inputs corresponding to a channel 'channel' and a modulation
# 'mod'. Optional normalization of channel to unit energy.
# This table is used by the 'metrics' block to translate
-# channel outputs to metrics for use with the Viterbi algorithm.
+# channel outputs to metrics for use with the Viterbi algorithm.
# Limitations: currently supports only one-dimensional modulations.
######################################################################
def make_isi_lookup(mod,channel,normalize):
@@ -102,7 +102,7 @@ def make_isi_lookup(mod,channel,normalize):
######################################################################
# Automatically generate the signals appropriate for CPM
-# decomposition.
+# decomposition.
# This decomposition is based on the paper by B. Rimoldi
# "A decomposition approach to CPM", IEEE Trans. Info Theory, March 1988
# See also my own notes at http://www.eecs.umich.edu/~anastas/docs/cpm.pdf
@@ -118,7 +118,7 @@ def make_cpm_signals(K,P,M,L,q,frac):
for m in range(L):
qq=qq + q[m*Q:m*Q+Q]
w=math.pi*h*(M-1)*t-2*math.pi*h*(M-1)*qq+math.pi*h*(L-1)*(M-1)
-
+
X=(M**L)*P
PSI=numpy.empty((X,Q))
for x in range(X):
@@ -133,9 +133,9 @@ def make_cpm_signals(K,P,M,L,q,frac):
PSI = numpy.transpose(PSI)
SS=numpy.exp(1j*PSI) # contains all signals as columns
#print SS
-
- # Now we need to orthogonalize the signals
+
+ # Now we need to orthogonalize the signals
F = scipy.linalg.orth(SS) # find an orthonormal basis for SS
#print numpy.dot(numpy.transpose(F.conjugate()),F) # check for orthonormality
S = numpy.dot(numpy.transpose(F.conjugate()),SS)
@@ -162,11 +162,11 @@ def make_cpm_signals(K,P,M,L,q,frac):
#print Ff
Sf = S[Esi[0:v0+1]]
#print Sf
-
+
return (f0,SS,S,F,Sf,Ff,N)
#return f0
-
+
diff --git a/gr-trellis/src/examples/python/test_cpm.py b/gr-trellis/src/examples/python/test_cpm.py
index 06d54b1a6..5342e57e8 100755
--- a/gr-trellis/src/examples/python/test_cpm.py
+++ b/gr-trellis/src/examples/python/test_cpm.py
@@ -82,7 +82,7 @@ def run_test(seed,blocksize):
data[i]=0
for i in range(tail+1):
data[-i]=0
-
+
##################################################
@@ -125,7 +125,7 @@ def run_test(seed,blocksize):
tb.connect((gr_streams_to_stream_0, 0), (gr_skiphead_0, 0))
tb.connect((gr_skiphead_0, 0), (viterbi, 0))
tb.connect((viterbi, 0), (gr_vector_sink_x_0, 0))
-
+
tb.run()
dataest = gr_vector_sink_x_0.data()
diff --git a/gr-trellis/src/examples/python/test_pccc_turbo1.py b/gr-trellis/src/examples/python/test_pccc_turbo1.py
index 7f1ea26ae..0655b972d 100755
--- a/gr-trellis/src/examples/python/test_pccc_turbo1.py
+++ b/gr-trellis/src/examples/python/test_pccc_turbo1.py
@@ -30,10 +30,10 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
metrics_in = trellis.metrics_f(fi.O()*fo.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO
scale = gr.multiply_const_ff(1.0/N0)
dec = trellis.pccc_decoder_s(fo,0,-1,fi,0,-1,interleaver,K,IT,trellis.TRELLIS_MIN_SUM)
-
+
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,mod)
#tb.connect (src,enc,mod)
#tb.connect(enc,code)
@@ -42,9 +42,9 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
tb.connect (add,metrics_in,scale,dec,fsmi2s,dst)
tb.run()
-
+
#print code.data()
-
+
ntotal = dst.ntotal ()
nright = dst.nright ()
runlength = dst.runlength ()
@@ -100,7 +100,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
diff --git a/gr-trellis/src/examples/python/test_sccc_hard.py b/gr-trellis/src/examples/python/test_sccc_hard.py
index e732ac2c0..4eeb94a12 100755
--- a/gr-trellis/src/examples/python/test_sccc_hard.py
+++ b/gr-trellis/src/examples/python/test_sccc_hard.py
@@ -33,7 +33,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
va_out = trellis.viterbi_s(fo,K,0,-1) # Put -1 if the Initial/Final states are not set.
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 (mod,(add,0))
tb.connect (noise,(add,1))
@@ -41,7 +41,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
tb.connect (metrics_in,va_in,deinter,metrics_out,va_out,fsmi2s,dst)
tb.run()
-
+
ntotal = dst.ntotal ()
nright = dst.nright ()
runlength = dst.runlength ()
@@ -71,7 +71,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)
@@ -81,7 +81,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
diff --git a/gr-trellis/src/examples/python/test_sccc_soft.py b/gr-trellis/src/examples/python/test_sccc_soft.py
index 1c71e4ca7..10c28419a 100755
--- a/gr-trellis/src/examples/python/test_sccc_soft.py
+++ b/gr-trellis/src/examples/python/test_sccc_soft.py
@@ -36,7 +36,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
va_out = trellis.viterbi_s(fo,K,0,-1) # Put -1 if the Initial/Final states are not set.
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 (mod,(add,0))
tb.connect (noise,(add,1))
@@ -46,7 +46,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
tb.connect (siso_in,deinter,va_out,fsmi2s,dst)
tb.run()
-
+
ntotal = dst.ntotal ()
nright = dst.nright ()
runlength = dst.runlength ()
@@ -76,7 +76,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)
@@ -100,7 +100,7 @@ def main(args):
print i+1,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s)/tot_s)
# estimate of the (short or bit) error rate
print rep,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s)/tot_s)
-
+
if __name__ == '__main__':
diff --git a/gr-trellis/src/examples/python/test_sccc_turbo.py b/gr-trellis/src/examples/python/test_sccc_turbo.py
index b1007a864..762a93ba5 100755
--- a/gr-trellis/src/examples/python/test_sccc_turbo.py
+++ b/gr-trellis/src/examples/python/test_sccc_turbo.py
@@ -72,7 +72,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
#(head,tail) = make_rx(tb,fo,fi,dimensionality,constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_SUM_PRODUCT)
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 (mod,(add,0))
tb.connect (noise,(add,1))
@@ -80,9 +80,9 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
tb.connect (tail,fsmi2s,dst)
tb.run()
-
+
#print enc_out.ST(), enc_in.ST()
-
+
ntotal = dst.ntotal ()
nright = dst.nright ()
runlength = dst.runlength ()
@@ -113,7 +113,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)
@@ -123,7 +123,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
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
diff --git a/gr-trellis/src/examples/python/test_sccc_turbo2.py b/gr-trellis/src/examples/python/test_sccc_turbo2.py
index fdb92adc8..dff1ba93c 100755
--- a/gr-trellis/src/examples/python/test_sccc_turbo2.py
+++ b/gr-trellis/src/examples/python/test_sccc_turbo2.py
@@ -29,7 +29,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
dec = trellis.sccc_decoder_s(fo,0,-1,fi,0,-1,interleaver,K,IT,trellis.TRELLIS_MIN_SUM)
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))
@@ -39,9 +39,9 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
tb.connect (add,metrics_in,scale,dec,fsmi2s,dst)
tb.run()
-
+
#print enc_out.ST(), enc_in.ST()
-
+
ntotal = dst.ntotal ()
nright = dst.nright ()
runlength = dst.runlength ()
@@ -72,7 +72,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)
@@ -82,7 +82,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
diff --git a/gr-trellis/src/examples/python/test_tcm.py b/gr-trellis/src/examples/python/test_tcm.py
index 62fd5135e..a7d6a02d0 100755
--- a/gr-trellis/src/examples/python/test_tcm.py
+++ b/gr-trellis/src/examples/python/test_tcm.py
@@ -35,9 +35,9 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set.
fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
#s2b = gr.packed_to_unpacked_ss(1,gr.GR_MSB_FIRST) # unpack shorts to bits
- #dst = gr.vector_sink_s();
+ #dst = gr.vector_sink_s();
dst = gr.check_lfsr_32k_s()
-
+
tb.connect (src,src_head,s2fsmi,enc,mod)
#tb.connect (src,b2s,s2fsmi,enc,mod)
@@ -46,11 +46,11 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
tb.connect (add,metrics)
tb.connect (metrics,va,fsmi2s,dst)
#tb.connect (metrics,va,fsmi2s,s2b,dst)
-
+
tb.run()
-
- # A bit of cheating: run the program once and print the
+
+ # A bit of cheating: run the program once and print the
# final encoder state..
# Then put it as the last argument in the viterbi block
#print "final state = " , enc.ST()
@@ -90,13 +90,13 @@ def main():
# system parameters
f=trellis.fsm(fname) # get the FSM specification from a file
# alternatively you can specify the fsm from its generator matrix
- #f=trellis.fsm(1,2,[5,7])
+ #f=trellis.fsm(1,2,[5,7])
Kb=1024*16 # packet size in bits (make it multiple of 16 so it can be packed in a short)
bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM input symbol
K=Kb/bitspersymbol # packet size in trellis steps
modulation = fsm_utils.psk4 # see fsm_utlis.py for available predefined modulations
dimensionality = modulation[0]
- constellation = modulation[1]
+ constellation = modulation[1]
if len(constellation)/dimensionality != f.O():
sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n')
sys.exit (1)
@@ -106,7 +106,7 @@ def main():
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
diff --git a/gr-trellis/src/examples/python/test_tcm_bit.py b/gr-trellis/src/examples/python/test_tcm_bit.py
index cc5caefbc..7f69c0e29 100755
--- a/gr-trellis/src/examples/python/test_tcm_bit.py
+++ b/gr-trellis/src/examples/python/test_tcm_bit.py
@@ -27,7 +27,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
enc = trellis.encoder_ss(f,0) # initial state = 0
mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
-
+
# CHANNEL
add = gr.add_ff()
noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
@@ -38,9 +38,9 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set.
fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
s2b = gr.packed_to_unpacked_ss(1,gr.GR_MSB_FIRST) # unpack shorts to bits
- dst = gr.vector_sink_s();
- #dst = gr.check_lfsr_32k_s();
-
+ dst = gr.vector_sink_s();
+ #dst = gr.check_lfsr_32k_s();
+
#tb.connect (src,src_head,s2fsmi,enc,mod)
tb.connect (src,b2s,s2fsmi,enc,mod)
@@ -49,11 +49,11 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
tb.connect (add,metrics)
#tb.connect (metrics,va,fsmi2s,dst)
tb.connect (metrics,va,fsmi2s,s2b,dst)
-
+
tb.run()
-
- # A bit of cheating: run the program once and print the
+
+ # A bit of cheating: run the program once and print the
# final encoder state..
# Then put it as the last argument in the viterbi block
#print "final state = " , enc.ST()
@@ -99,7 +99,7 @@ def main():
K=Kb/bitspersymbol # packet size in trellis steps
modulation = fsm_utils.psk4 # see fsm_utlis.py for available predefined modulations
dimensionality = modulation[0]
- constellation = modulation[1]
+ constellation = modulation[1]
if len(constellation)/dimensionality != f.O():
sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n')
sys.exit (1)
@@ -109,7 +109,7 @@ def main():
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
diff --git a/gr-trellis/src/examples/python/test_tcm_combined.py b/gr-trellis/src/examples/python/test_tcm_combined.py
index 55a3043b8..d98e36e27 100755
--- a/gr-trellis/src/examples/python/test_tcm_combined.py
+++ b/gr-trellis/src/examples/python/test_tcm_combined.py
@@ -25,22 +25,22 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
add = gr.add_ff()
noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
-
+
# RX
va = trellis.viterbi_combined_fs(f,K,0,-1,dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # Put -1 if the Initial/Final states are not set.
fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s();
-
+ dst = gr.check_lfsr_32k_s();
+
tb.connect (src,src_head,s2fsmi,enc,mod)
tb.connect (mod,(add,0))
tb.connect (noise,(add,1))
tb.connect (add,va,fsmi2s,dst)
-
+
tb.run()
-
- # A bit of cheating: run the program once and print the
+
+ # A bit of cheating: run the program once and print the
# final encoder state..
# Then put it as the last argument in the viterbi block
#print "final state = " , enc.ST()
@@ -48,7 +48,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
ntotal = dst.ntotal ()
nright = dst.nright ()
runlength = dst.runlength ()
-
+
return (ntotal,ntotal-nright)
@@ -76,7 +76,7 @@ def main():
K=Kb/bitspersymbol # packet size in trellis steps
modulation = fsm_utils.psk4 # see fsm_utils.py for available predefined modulations
dimensionality = modulation[0]
- constellation = modulation[1]
+ constellation = modulation[1]
if len(constellation)/dimensionality != f.O():
sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n')
sys.exit (1)
diff --git a/gr-trellis/src/examples/python/test_tcm_parallel.py b/gr-trellis/src/examples/python/test_tcm_parallel.py
index 2b722c09e..0372351aa 100755
--- a/gr-trellis/src/examples/python/test_tcm_parallel.py
+++ b/gr-trellis/src/examples/python/test_tcm_parallel.py
@@ -43,11 +43,11 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P):
tb.connect (add[i],(metrics,i))
tb.connect ((metrics,i),(va,i),(p2s,i))
tb.connect (p2s,fsmi2s,dst)
-
+
tb.run()
-
- # A bit of cheating: run the program once and print the
+
+ # A bit of cheating: run the program once and print the
# final encoder state.
# Then put it as the last argument in the viterbi block
#print "final state = " , enc.ST()
@@ -55,7 +55,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P):
ntotal = dst.ntotal ()
nright = dst.nright ()
runlength = dst.runlength ()
-
+
return (ntotal,ntotal-nright)
diff --git a/gr-trellis/src/examples/python/test_turbo_equalization.py b/gr-trellis/src/examples/python/test_turbo_equalization.py
index 6fa6749f0..18bfb022a 100755
--- a/gr-trellis/src/examples/python/test_turbo_equalization.py
+++ b/gr-trellis/src/examples/python/test_turbo_equalization.py
@@ -44,7 +44,7 @@ def make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,typ
else:
tb.connect (siso_in[it],deinter[it],siso_out[it])
tb.connect (inter[it],(siso_in[it],0))
-
+
return (metrics_in,siso_out[IT-1])
@@ -64,25 +64,25 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,tot_constellat
# CHANNEL
add = gr.add_ff()
noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
-
+
# RX
- (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
+ (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s();
-
+ dst = gr.check_lfsr_32k_s();
+
tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod)
tb.connect (mod,(add,0))
tb.connect (noise,(add,1))
tb.connect (add,head)
tb.connect (tail,fsmi2s,dst)
-
+
tb.run()
ntotal = dst.ntotal ()
nright = dst.nright ()
runlength = dst.runlength ()
- #print ntotal,nright,runlength
-
+ #print ntotal,nright,runlength
+
return (ntotal,ntotal-nright)
diff --git a/gr-trellis/src/examples/python/test_turbo_equalization1.py b/gr-trellis/src/examples/python/test_turbo_equalization1.py
index 15a8f6809..17ad43023 100755
--- a/gr-trellis/src/examples/python/test_turbo_equalization1.py
+++ b/gr-trellis/src/examples/python/test_turbo_equalization1.py
@@ -67,17 +67,17 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona
isi = gr.fir_filter_fff(1,channel)
add = gr.add_ff()
noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
-
+
# RX
- (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
- dst = gr.vector_sink_s();
-
+ (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
+ dst = gr.vector_sink_s();
+
tb.connect (src,enc_out,inter,mod)
tb.connect (mod,isi,(add,0))
tb.connect (noise,(add,1))
tb.connect (add,head)
tb.connect (tail,dst)
-
+
tb.run()
data = dst.data()
@@ -88,7 +88,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona
nright=nright+1
#else:
#print "Error in ", i
-
+
return (ntotal,ntotal-nright)
diff --git a/gr-trellis/src/examples/python/test_turbo_equalization2.py b/gr-trellis/src/examples/python/test_turbo_equalization2.py
index 7e4341cba..5a6c77e9d 100755
--- a/gr-trellis/src/examples/python/test_turbo_equalization2.py
+++ b/gr-trellis/src/examples/python/test_turbo_equalization2.py
@@ -65,17 +65,17 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona
isi = gr.fir_filter_fff(1,channel)
add = gr.add_ff()
noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
-
+
# RX
- (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
- dst = gr.vector_sink_s();
-
+ (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
+ dst = gr.vector_sink_s();
+
tb.connect (src,enc_out,inter,mod)
tb.connect (mod,isi,(add,0))
tb.connect (noise,(add,1))
tb.connect (add,head)
tb.connect (tail,dst)
-
+
tb.run()
data = dst.data()
@@ -86,7 +86,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona
nright=nright+1
#else:
#print "Error in ", i
-
+
return (ntotal,ntotal-nright)
@@ -117,7 +117,7 @@ def main(args):
tot_channel = fsm_utils.make_isi_lookup(modulation,channel,True) # generate the lookup table (normalize energy to 1)
dimensionality = tot_channel[0]
N0=pow(10.0,-esn0_db/10.0); # noise variance
- tot_constellation =[0]*len(tot_channel[1])
+ tot_constellation =[0]*len(tot_channel[1])
for i in range(len(tot_channel[1])):
tot_constellation[i] = tot_channel[1][i] * math.sqrt(1.0/N0)
if len(tot_constellation)/dimensionality != fi.O():
diff --git a/gr-trellis/src/examples/python/test_viterbi_equalization.py b/gr-trellis/src/examples/python/test_viterbi_equalization.py
index d290a0d0a..9f3f7e391 100755
--- a/gr-trellis/src/examples/python/test_viterbi_equalization.py
+++ b/gr-trellis/src/examples/python/test_viterbi_equalization.py
@@ -21,26 +21,26 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,seed):
# CHANNEL
add = gr.add_ff()
noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
-
+
# RX
metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi
va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set.
fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s();
-
+ dst = gr.check_lfsr_32k_s();
+
tb.connect (src,src_head,s2fsmi,enc,mod)
tb.connect (mod,(add,0))
tb.connect (noise,(add,1))
tb.connect (add,metrics)
tb.connect (metrics,va,fsmi2s,dst)
-
+
tb.run()
ntotal = dst.ntotal ()
nright = dst.nright ()
runlength = dst.runlength ()
- #print ntotal,nright,runlength
-
+ #print ntotal,nright,runlength
+
return (ntotal,ntotal-nright)
diff --git a/gr-trellis/src/examples/python/test_viterbi_equalization1.py b/gr-trellis/src/examples/python/test_viterbi_equalization1.py
index 41f777551..90eb4790e 100755
--- a/gr-trellis/src/examples/python/test_viterbi_equalization1.py
+++ b/gr-trellis/src/examples/python/test_viterbi_equalization1.py
@@ -28,7 +28,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel
isi = gr.fir_filter_fff(1,channel)
add = gr.add_ff()
noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
-
+
# RX
skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols
#metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi
@@ -45,7 +45,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel
tb.run()
- data = dst.data()
+ data = dst.data()
ntotal = len(data) - L
nright=0
for i in range(ntotal):
@@ -53,7 +53,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel
nright=nright+1
#else:
#print "Error in ", i
-
+
return (ntotal,ntotal-nright)