libera_utils.packets#
Module for reading packet data
Functions
|
Create an array from a list of packets. |
|
Parse a recarray from a list of packet filepaths, assuming the same parser for all |
- libera_utils.packets.array_from_packets(packets: list, apid: int = None)#
Create an array from a list of packets. This function assumes that the fields and format for every packet is identical for a given APID.
- Parameters:
- Returns:
Record array with one column per field name in the packet type. Values are derived if a derived value exists, otherwise, the values are the raw values.
- Return type:
- libera_utils.packets.parse_packets(packet_parser: PacketParser, packet_data_filepaths: list, apid: int = None)#
Parse a recarray from a list of packet filepaths, assuming the same parser for all
- Parameters:
packet_parser (space_packet_parser.parser.PacketParser) – Parser, already initialized with the anticipated definition.
packet_data_filepaths (list) – List of filepaths to packets files.
apid (int) – Filter on APID so we don’t get mismatches in case the parser finds multiple parsable packet definitions in the files. This can happen if the XTCE document contains definitions for multiple packet types and >1 of those packet types is present in the packet data files.
- Returns:
Concatenated arrays of packet data.
- Return type: