Changeset 5d039b8 in ammosreader


Ignore:
Timestamp:
07/25/22 09:40:40 (3 years ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
AmmosSource, guix
Children:
5ba04b8, e4e63a3
Parents:
dbcb255
Message:

dtoa and time of arrival as keys used

Location:
ammosreader
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ammosreader/PDW.py

    rdbcb255 r5d039b8  
    223223
    224224    def to_json(self):
    225         return {'TIMEOFARRIVAL': self.time_of_arrival,
     225        return {'time of arrival': self.time_of_arrival,
    226226                'FORMATIDENTIFIER': self.pdw_format_identifier,
    227                 'CENTERFREQUENCY': self.center_frequency,
     227                'center frequency': self.center_frequency,
    228228                'VALID': self.is_valid,
    229229                'PULSE': self.is_pulse,
  • ammosreader/PPDWContainer.py

    rdbcb255 r5d039b8  
    2929        for index, current_pdw in enumerate(self.signals[1:]):
    3030            pulse_dict[index+1] = current_pdw.to_json()
    31             pulse_dict[index]["TIMEDELTA"] = current_pdw.time_of_arrival - pulse_dict[index]["TIMEOFARRIVAL"]
    32         pulse_dict[index+1]["TIMEDELTA"] = 0
     31            pulse_dict[index]["dtoa"] = (current_pdw.time_of_arrival - pulse_dict[index]["time of arrival"]).item()/1000.0
     32        pulse_dict[index+1]["dtoa"] = 0.0  # np.timedelta64(0, 'us')
    3333        return pulse_dict
    3434
     
    6060                'STARTTIME': str(self.start_time()),
    6161                'ENDTIME': str(self.end_time()),
    62                 # 'CENTERFREQUENCIES': self.center_frequencies(),
    63                 'CHANNELS': self.channels()
    64                 # 'MODULATIONS': self.modulations(),
    65                 # 'BANDWIDTHS': self.bandwidths()
     62                'CENTERFREQUENCIES': self.center_frequencies(),
     63                'CHANNELS': self.channels(),
     64                'MODULATIONS': self.modulations(),
     65                'BANDWIDTHS': self.bandwidths()
    6666                }
    6767
Note: See TracChangeset for help on using the changeset viewer.