comnum.theory_rs_wer#

comnum.theory_rs_wer(n, t, p_s)#

The word error rate of a bounded-distance decoder of a t-error-correcting code of n symbols over a memoryless channel of symbol error probability p_s (Proakis & Salehi, Digital Communications, 5th ed., Sec. 7.5.2): the probability of more than t wrong symbols.

Parameters:
  • n (int) – word length (symbols).

  • t (int) – symbol errors corrected per word.

  • p_s (float | array_like) – symbol error probability of the channel.

Returns:

the word error probability at every p_s.

Return type:

float | numpy.ndarray

Raises:

ValueError – for values that are not real numbers.

Examples

>>> import comnum
>>> pw = comnum.theory_rs_wer(255, 16, [1e-3, 1e-2])
>>> bool(pw[0] < 1e-15), round(float(pw[1]), 12)
(True, 1.4e-09)