crc12

baseband.mark4.header.crc12 = <baseband.base.utils.CRCStack object>

Cyclic Redundancy Check for a bitstream.

See https://en.wikipedia.org/wiki/Cyclic_redundancy_check

Once initialised, the instance can be used as a function that calculates the CRC, or one can use the check method to verify that the CRC at the end of a stream is correct.

This class is specifically for arrays in which multiple bit streams occupy different bit levels, and the dimension is treated as the index into the bits. A single stream would thus be of type bool. Unsigned integers represent multiple streams. E.g., for a 64-track Mark 4 header, the stream would be an array of np.uint64 words.

Parameters:
polynomialint

Binary encoded CRC divisor. For instance, that used by Mark 4 headers is 0x180f, or x^12 + x^11 + x^3 + x^2 + x + 1.

See also

baseband.base.utils.CRC

for calculating CRC for a single value or an array of values.