nilspodlib.utils.read_binary_uint8#
- nilspodlib.utils.read_binary_uint8(data_bytes: ndarray, packet_size: int, expected_samples: int) ndarray [source]#
Read a continuous stream of uint8 values into its separate datapoints.
- Parameters:
- data_bytes
The raw stream of data bytes
- packet_size
The size of each datapacket stored in the stream
- expected_samples
The expected number of samples in the data stream. This is only used to check the integrity of the datastream and raise a warning if, the number of samples in the dataset, does not match the expected number.
- Returns:
- data
Array with the shape (n_samples, packet_size)