Changeset 7a9c068 in ammosreader
- Timestamp:
- 05/17/23 20:33:45 (2 years ago)
- Branches:
- AmmosSource, guix
- Children:
- 79e8edb
- Parents:
- 9dc7beb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ammosreader/PDW.py
r9dc7beb r7a9c068 24 24 :rtype: PDW 25 25 """ 26 assert(len(byte_string) == 32) 26 if (len(byte_string) != 32): 27 raise TypeError("Too many bytes") 27 28 28 29 parts = struct.unpack('<Q4s4s4s4s4s4s', byte_string) 29 30 nanoseconds = (parts[0]) 31 if (np.datetime64('now', 'ns').astype(int) >= nanoseconds): 32 raise OverflowError("Timestamp invalid") 30 33 time_of_arrival = np.datetime64(nanoseconds, 'ns') 31 34
Note:
See TracChangeset
for help on using the changeset viewer.