Example #1
0
 def test_vstheory_evm(self, M, snr, synced):
     s = signals.SignalQAMGrayCoded(M, 2 ** 16)
     off = {4: 6, 16: 13, 64: 18, 128: 20}
     snr = snr+off[M]
     ss = impairments.change_snr(s, snr)
     evm = helpers.lin2dB(ss.cal_evm(synced=synced)**2)
     npt.assert_allclose(snr, -evm, rtol=0.01)
Example #2
0
 def test_vstheory_evm(self, M, snr, os):
     s = signals.SignalQAMGrayCoded(M, 2 ** 16)
     off = {4: 6, 16: 13, 64: 18, 128: 20}
     snr = snr+off[M]
     s = s.resample(os, beta=0.1, renormalise=True)
     ss = impairments.change_snr(s, snr)
     ss = ss.resample(1, beta=0.1, renormalise=True)
     evm = helpers.lin2dB(ss.cal_evm() ** 2)
     npt.assert_allclose(snr, -evm, rtol=0.1)
Example #3
0
 def test_lin2dB(self, nmodes):
     s = signals.SignalQAMGrayCoded(64, 2**12, nmodes=nmodes)
     s2 = helpers.lin2dB(s)
     assert s.shape == s2.shape
Example #4
0
 def test_lin2dB(self):
     s = signals.SignalQAMGrayCoded(64, 2**12)
     s2 = helpers.lin2dB(s)
     assert type(s) is type(s2)