Changeset bfab5ea in ammosreader


Ignore:
Timestamp:
05/05/22 15:00:19 (3 years ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
AmmosSource, guix
Children:
6808525
Parents:
d954282
Message:

import script for ammos signal dirs added

Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/ammosreader/PDW.py

    rd954282 rbfab5ea  
    3333        parts = struct.unpack('Q4s4s4s4s4s4s', byte_string)
    3434        nanoseconds = (parts[0])
    35         time_of_arrival = np.datetime64(nanoseconds, 'ns')  #datetime.datetime.utcfromtimestamp(seconds / 1000000000)
     35        time_of_arrival = np.datetime64(nanoseconds, 'ns')
    3636
    3737        third_entry = bin(int.from_bytes(parts[1], byteorder='little'))
     
    9494                 pulse_level_or_pulse_field_strength, region_of_interest, azimuth_confidence, modulation,
    9595                 sector, polarity, df_quality, elevation, azimuth, channel):
    96 
    97         """
     96        r"""
     97        I return an instance of an Pulse Data word.
    9898
    9999        :param time_of_arrival: nanoseconds since 1970-01-01 00:00:00
     
    142142        :return: An instance of class PDW with attributes set according to the data of a data body
    143143        :rtype: PDW
    144 
    145144        """
    146 
    147145        self.time_of_arrival = time_of_arrival
    148146        self.pdw_format_identifier = pdw_format_identifier
  • src/ammosreader/PPDWContainer.py

    rd954282 rbfab5ea  
    11class PPDWContainer():
    2 
     2    """
     3    I store multiple signals imported from one or more .ppdw files
     4    .. automethod:: __init__
    35    """
    46
    5     I store multiple signals imported from one or more .ppdw files
     7    def __init__(self, name, signals=None):
    68
    7     .. automethod:: __init__
     9        if signals is None:
     10            self.signals = []
     11        else:
     12            self.signals = signals
    813
    9     """
    10 
    11     def __init__(self, signals):
    12 
    13         self.signals = signals
     14    def add(self, a_pdw):
     15        self.signals.append(a_pdw)
    1416
    1517
Note: See TracChangeset for help on using the changeset viewer.