Changeset bfab5ea in ammosreader
- Timestamp:
- 05/05/22 15:00:19 (3 years ago)
- Branches:
- AmmosSource, guix
- Children:
- 6808525
- Parents:
- d954282
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ammosreader/PDW.py
rd954282 rbfab5ea 33 33 parts = struct.unpack('Q4s4s4s4s4s4s', byte_string) 34 34 nanoseconds = (parts[0]) 35 time_of_arrival = np.datetime64(nanoseconds, 'ns') #datetime.datetime.utcfromtimestamp(seconds / 1000000000)35 time_of_arrival = np.datetime64(nanoseconds, 'ns') 36 36 37 37 third_entry = bin(int.from_bytes(parts[1], byteorder='little')) … … 94 94 pulse_level_or_pulse_field_strength, region_of_interest, azimuth_confidence, modulation, 95 95 sector, polarity, df_quality, elevation, azimuth, channel): 96 97 """96 r""" 97 I return an instance of an Pulse Data word. 98 98 99 99 :param time_of_arrival: nanoseconds since 1970-01-01 00:00:00 … … 142 142 :return: An instance of class PDW with attributes set according to the data of a data body 143 143 :rtype: PDW 144 145 144 """ 146 147 145 self.time_of_arrival = time_of_arrival 148 146 self.pdw_format_identifier = pdw_format_identifier -
src/ammosreader/PPDWContainer.py
rd954282 rbfab5ea 1 1 class PPDWContainer(): 2 2 """ 3 I store multiple signals imported from one or more .ppdw files 4 .. automethod:: __init__ 3 5 """ 4 6 5 I store multiple signals imported from one or more .ppdw files7 def __init__(self, name, signals=None): 6 8 7 .. automethod:: __init__ 9 if signals is None: 10 self.signals = [] 11 else: 12 self.signals = signals 8 13 9 """ 10 11 def __init__(self, signals): 12 13 self.signals = signals 14 def add(self, a_pdw): 15 self.signals.append(a_pdw) 14 16 15 17
Note:
See TracChangeset
for help on using the changeset viewer.