commpy.channelcoding.map_decode

map_decode(sys_symbols, non_sys_symbols, trellis, noise_variance, L_int, mode='decode')

Maximum a-posteriori probability (MAP) decoder.

Decodes a stream of convolutionally encoded (rate 1/2) bits using the MAP algorithm.

Parameters:
  • sys_symbols (1D ndarray) – Received symbols corresponding to the systematic (first output) bits in the codeword.
  • non_sys_symbols (1D ndarray) – Received symbols corresponding to the non-systematic (second output) bits in the codeword.
  • trellis (Trellis object) – Trellis representation of the convolutional code.
  • noise_variance (float) – Variance (power) of the AWGN channel.
  • L_int (1D ndarray) –

    Array representing the initial intrinsic information for all received symbols.

    Typically all zeros, corresponding to equal prior probabilities of bits 0 and 1.

  • mode (str{'decode', 'compute'}, optional) –

    The mode in which the MAP decoder is used. ‘decode’ mode returns the decoded bits

    along with the extrinsic information. ‘compute’ mode returns only the extrinsic information.

Returns:

[L_ext, decoded_bits] – The first element of the list is the extrinsic information. The second element of the list is the decoded bits.

Return type:

list of two 1D ndarrays