Read and unpack the next bytes from a binary file. :param fid: :param num_bytes: Sum of combination of {2, 4, 8}, e.g. 2, 6, 16, 30, etc. :param format_char_sequence: List of {c, e, f, d, h, H, i, I, l, L, q, Q}. :param endian_character: Any of {@, =, <, >, !} :return: Tuple of r
(fid, num_bytes, format_char_sequence, endian_character="<")
| 70 | return qvec2rotmat(self.qvec) |
| 71 | |
| 72 | def read_next_bytes(fid, num_bytes, format_char_sequence, endian_character="<"): |
| 73 | """Read and unpack the next bytes from a binary file. |
| 74 | :param fid: |
| 75 | :param num_bytes: Sum of combination of {2, 4, 8}, e.g. 2, 6, 16, 30, etc. |
| 76 | :param format_char_sequence: List of {c, e, f, d, h, H, i, I, l, L, q, Q}. |
| 77 | :param endian_character: Any of {@, =, <, >, !} |
| 78 | :return: Tuple of read and unpacked values. |
| 79 | """ |
| 80 | data = fid.read(num_bytes) |
| 81 | return struct.unpack(endian_character + format_char_sequence, data) |
| 82 | |
| 83 | def read_points3D_text(path): |
| 84 | """ |
no outgoing calls
no test coverage detected