def cal_snr_blind_qpsk(E): """ Calculates the SNR of a QPSK signal based on the variance of the constellation assmuing no symbol errors""" E4 = -E**4 Eref = E4**(1. / 4) #P = np.mean(abs(Eref**2)) P = np.mean(cabssquared(Eref)) var = np.var(Eref) SNR = 10 * np.log10(P / var) return SNR
def test_cabssquared(self): s = signals.SignalQAMGrayCoded(64, 2**12) s2 = helpers.cabssquared(s) assert type(s) is type(s2)
def test_cabssquared(self, nmodes): s = signals.SignalQAMGrayCoded(64, 2**12, nmodes=nmodes) s2 = helpers.cabssquared(s) assert s.shape == s2.shape