astrogewgaw / PackedIntegers.jl

(Un)pack 1/2/4-bit integers from 8-bit integer data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PackedIntegers

(Un)pack 1/2/4-bit integers from 8-bit integer data.


License GitHub Stars Gitmoji Badge

In radio astronomy, 1/2/4-bit data is commonplace, and still in use at many telescopes around the world. In such cases, 8, 4, or 2 integers are packed into a single 8-bit integer. In order to read data like this back in for further analysis, one needs to unpack it. One will therefore read in the data as 8-bit integers, and then apply a sequence of bit operations for unpacking. This package exports two functions: unpack and pack, for unpacking, or repacking, 1/2/4-bit data, respectively.

Install it by typing and running:

] add PackedIntegers

in the Julia REPL.

About

(Un)pack 1/2/4-bit integers from 8-bit integer data.

License:MIT License


Languages

Language:Julia 100.0%