# init_luts¶

- baseband.mark5b.payload.init_luts()[source] [edit on github]¶
Set up the look-up tables for levels as a function of input byte.

- For 1-bit mode, one has just the sign bit:
s

value

0

+1

1

-1

- For 2-bit mode, there is a sign and a magnitude, which encode:
m

s

value

s*2+m

0

0

-Hi

0

0

1

+1

2

1

0

-1

1

1

1

+Hi

3

Note that the sign bit is flipped for 1-bit mode from what one might expect from the 2-bit encodings (at least, as implemented in mark5access; the docs are rather unclear). For more details, see Table 13 in https://library.nrao.edu/public/memos/vlba/up/VLBASU_13.pdf and https://www.haystack.mit.edu/tech/vlbi/mark5/docs/Mark%205B%20users%20manual.pdf Appendix A: sign always on even bit stream (0, 2, 4, …), and magnitude on adjacent odd stream (1, 3, 5, …).

In the above table, the last column is the index in the linearly increasing table of levels (

`decoder_levels[2]`

).