comnum.theory_mi#
- comnum.theory_mi(m, snr_db, kind='qam', *, px=None, fading='awgn', points=Ellipsis)#
Mutual information of a constellation over AWGN (OptiCommPy
theoryMI) or Rayleigh fading known at the receiver, by Gauss–Hermite quadrature.- Parameters:
m (int) – order.
snr_db (float | array_like) –
E_s/σ²(dB); PAM and OOK see a real channel, the others a circular complex one, as in OptiCommPy.kind (str) –
"qam","psk","pam"or"ook".px (array_like, optional) – probabilities of the points.
fading (str) –
"awgn"or"rayleigh".points (int) – quadrature nodes per dimension.
- Returns:
the mutual information (bits/symbol) at every SNR.
- Return type:
- Raises:
ValueError – for an invalid parameter or input (the message names it).
Examples
>>> import comnum >>> round(comnum.theory_mi(4, 30.0), 6) 2.0