comnum.msk_bits#

comnum.msk_bits(phase_states)#

The information bits of MSK from the terminal phase states of a survivor path (the second array of Cpm.ml_detect_path(), in units of π/2): the inverse of msk_precode().

Parameters:

phase_states (array_like) – N + 1 phase states.

Returns:

the N bits (uint8).

Return type:

numpy.ndarray

Raises:

ValueError – for an input that is not an array of numbers of the expected shape.

Examples

>>> import comnum
>>> msk = comnum.Cpm.msk(4)
>>> bits = [1, 0, 1, 1, 0, 0, 0, 1]
>>> _, states = msk.ml_detect_path(msk.modulate(comnum.msk_precode(bits)))
>>> comnum.msk_bits(states).tolist() == bits
True