Channel Coding (commpy.channelcoding)

Galois Fields

GF(x, m) Defines a Binary Galois Field of order m, containing n, where n can be a single element or a list of elements within the field.

Algebraic Codes

cyclic_code_genpoly(n, k) Generate all possible generator polynomials for a (n, k)-cyclic code.

Convolutional Codes

Trellis(memory, g_matrix[, feedback, code_type]) Class defining a Trellis corresponding to a k/n - rate convolutional code.
conv_encode(message_bits, trellis[, …]) Encode bits using a convolutional code.
viterbi_decode(coded_bits, trellis[, …]) Decodes a stream of convolutionally encoded bits using the Viterbi Algorithm :param coded_bits: Stream of convolutionally encoded bits which are to be decoded.

Turbo Codes

turbo_encode(msg_bits, trellis1, trellis2, …) Turbo Encoder.
map_decode(sys_symbols, non_sys_symbols, …) Maximum a-posteriori probability (MAP) decoder.
turbo_decode(sys_symbols, non_sys_symbols_1, …) Turbo Decoder.

LDPC Codes

get_ldpc_code_params(ldpc_design_filename) Extract parameters from LDPC code design file.
ldpc_bp_decode(llr_vec, ldpc_code_params, …) LDPC Decoder using Belief Propagation (BP).

Interleavers and De-interleavers

RandInterlv(length, seed) Random Interleaver.