Changeset 3c331d1 in ammosreader for ammosreader/PDW.py


Ignore:
Timestamp:
05/18/23 12:52:59 (2 years ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
AmmosSource, guix
Children:
14d7f7d
Parents:
d34008d
Message:

timestamp check fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ammosreader/PDW.py

    rd34008d r3c331d1  
    2929        parts = struct.unpack('<Q4s4s4s4s4s4s', byte_string)
    3030        nanoseconds = (parts[0])
    31         if (np.datetime64('now', 'ns').astype(int) >= nanoseconds):
     31        print("Nanoseconds", nanoseconds)
     32        unix_time = np.datetime64('now', 'ns').astype(int)
     33        if unix_time > nanoseconds):
    3234            raise OverflowError("Timestamp invalid")
    3335        time_of_arrival = np.datetime64(nanoseconds, 'ns')
Note: See TracChangeset for help on using the changeset viewer.