SciFiReaders.readers.microscopy.spm.afm.base_utils.read_binary_data

SciFiReaders.readers.microscopy.spm.afm.base_utils.read_binary_data(file_path, offset, num_bytes, bytes_per_data_point)[source]

Reads numeric data encoded in binary files. Uses instructions such as offset, length and precision :param file_path: :type file_path: str :param offset: Byte offset into the file :type offset: uint :param num_bytes: Number of bytes to read from the offset :type num_bytes: uint :param bytes_per_data_point: Precision of stored data. Currently accounting only for half-precision (16 bit / 2 byte) and full precision

(32 bit / 4 byte) data

Returns

value – 1D array of numeric values

Return type

np.ndarray