comnum.snr_m2m4_db#
- comnum.snr_m2m4_db(x, constellation)#
The M2M4 estimate of the SNR (Pauluzzi & Beaulieu 2000), generalised to alphabets of several amplitudes by their kurtosis; it degrades at high SNR for QAM.
- Parameters:
x (array_like) – the samples (complex), at one sample per symbol.
constellation (Constellation) – the alphabet.
- Returns:
the SNR (dB);
infwhen the moments give no noise.- Return type:
- Raises:
ValueError – for an invalid parameter or input (the message names it).
Examples
>>> import comnum >>> rng = comnum.Rng(2) >>> c = comnum.Constellation("psk", 8).normalized() >>> x = c.points[rng.integers(8, 100_000)] + rng.complex_noise(100_000, 0.1) >>> round(comnum.snr_m2m4_db(x, c), 1) 10.0