Changeset aebe4a1 in ammosreader


Ignore:
Timestamp:
07/22/22 10:51:45 (3 years ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
AmmosSource, guix
Children:
19ee734
Parents:
a19529a
Message:

add as_pulse_dict added to PPDWContainer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ammosreader/PPDWContainer.py

    ra19529a raebe4a1  
    2323    def add(self, a_pdw):
    2424        self.signals.append(a_pdw)
     25
     26    def as_pulse_dict(self):
     27        pulse_dict = {}
     28        pulse_dict[0] = self.signals[0].to_json()
     29        for index, current_pdw in enumerate(self.signals[1:]):
     30            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
     33        return pulse_dict
    2534
    2635    def julian_date_string(self):
Note: See TracChangeset for help on using the changeset viewer.