OPTIMAL_2BIT_HIGH

baseband.base.encoding.OPTIMAL_2BIT_HIGH = 3.316505

Optimal high value for a 2-bit digitizer for which the low value is 1.

It is chosen such that for a normal distribution in which 68.269% of all values are at the low level, this is the mean of the others, i.e.,

\[l = \frac{\int_\sigma^\infty x \exp(-\frac{x^2}{2\sigma^2}) dx} {\int_\sigma^\infty \exp(-\frac{x^2}{2\sigma^2}) dx},\]

where the standard deviation is determined from:

\[1 = \frac{\int_0^\sigma x \exp(-\frac{x^2}{2\sigma^2}) dx} {\int_0^\sigma \exp(-\frac{x^2}{2\sigma^2}) dx}.\]

These give:

\[\sigma = \frac{\sqrt{\frac{\pi}{2}}\mathrm{erf} (\sqrt{1/2})}{1 - \sqrt{1/e}} = 2.174564,\]

and

\[l = \frac{1}{(\sqrt{e} - 1)(1/\mathrm{erf}(\sqrt{1/2}) - 1)} = 3.316505\]