nilspodlib.utils: Some internal helper#

Set of helper functions used throughout the library.

Helper Functions#

convert_little_endian(byte_list[, dtype])

Convert a little endian bytestring into a readable format.

read_binary_uint8(data_bytes, packet_size, ...)

Read a continuous stream of uint8 values into its separate datapoints.

get_header_and_data_bytes(path)

Separate a binary file into its header and data part.

get_sample_size_from_header_bytes(header_bytes)

Get the size of an individual data sample (in bytes) from the header info.

get_strict_version_from_header_bytes(...)

Extract the version number from a byte header.

inplace_or_copy(obj, inplace)

Either create a deepcopy of the object or return it based on the value of inplace.

validate_existing_overlap(start_vals, end_vals)

Check that multiple intervals indicated by their start and stop values do all have an overlapping region.

remove_docstring_indent(doc_str)

Remove the additional indent of a multiline docstring.