|
1 | 1 | # Authors: Youness Akourim <akourim97@gmail.com> |
2 | 2 | # License: BSD 3-Clause |
3 | 3 |
|
4 | | -from commpy.channels import MIMOFlatChannel |
5 | | -from commpy.links import * |
6 | | -from commpy.modulation import QAMModem, mimo_ml, bit_lvl_repr |
7 | 4 | from numpy import zeros, identity, arange, concatenate, log2, array |
8 | 5 | from numpy.random import seed |
9 | 6 | from numpy.testing import run_module_suite, assert_allclose, dec |
10 | 7 |
|
| 8 | +from commpy.channels import MIMOFlatChannel |
| 9 | +from commpy.links import * |
| 10 | +from commpy.modulation import QAMModem, mimo_ml, bit_lvl_repr |
| 11 | + |
11 | 12 |
|
12 | 13 | @dec.slow |
13 | 14 | def test_bit_lvl_repr(): |
@@ -35,13 +36,13 @@ def receiverWithoutBLR(y, H, cons): |
35 | 36 | return qam.demodulate(mimo_ml(y, H, cons), 'hard') |
36 | 37 |
|
37 | 38 | MymodelWithoutBLR = \ |
38 | | - linkModel(qam.modulate, RayleighChannel, receiverWithoutBLR, qam.num_bits_symbol, qam.constellation, qam.Es) |
| 39 | + LinkModel(qam.modulate, RayleighChannel, receiverWithoutBLR, qam.num_bits_symbol, qam.constellation, qam.Es) |
39 | 40 | MymodelWithBLR = \ |
40 | | - linkModel(qam.modulate, RayleighChannel, receiverWithBLR, qam.num_bits_symbol, qam.constellation, qam.Es) |
| 41 | + LinkModel(qam.modulate, RayleighChannel, receiverWithBLR, qam.num_bits_symbol, qam.constellation, qam.Es) |
41 | 42 |
|
42 | 43 | BERWithoutBLR = link_performance(MymodelWithoutBLR, SNR, 300e4, 300) |
43 | 44 | BERWithBLR = link_performance(MymodelWithBLR, SNR, 300e4, 300) |
44 | | - assert_allclose(BERWithoutBLR, BERWithBLR, rtol=0.25, |
| 45 | + assert_allclose(BERWithoutBLR, BERWithBLR, rtol=0.5, |
45 | 46 | err_msg='bit_lvl_repr changes the performance') |
46 | 47 |
|
47 | 48 |
|
|
0 commit comments