libera_utils.packets#
Module for reading packet data using Space Packet Parser
Functions
|
Parse packets from files into a pandas DataFrame using Space Packet Parser v6.0.0rc3. |
|
Read Az/El packet data from a list of file paths. |
|
Read spacecraft packet data from a list of file paths. |
- libera_utils.packets.parse_packets_to_dataframe(packet_definition: str | CloudPath | Path | XtcePacketDefinition, packet_data_filepaths: list[str | CloudPath | Path], apid: int | None = None, skip_header_bytes: int = 0) DataFrame #
Parse packets from files into a pandas DataFrame using Space Packet Parser v6.0.0rc3.
- Parameters:
packet_definition (str | PathType | XtcePacketDefinition) – XTCE packet definition file path or pre-loaded XtcePacketDefinition object.
packet_data_filepaths (list[str | PathType]) – List of filepaths to packet files.
apid (Optional[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.
skip_header_bytes (int) – Number of header bytes to skip when reading packet files. Default is 0.
- Returns:
pandas DataFrame containing parsed packet data.
- Return type:
pd.DataFrame
- libera_utils.packets.read_azel_packet_data(packet_data_filepaths: list[str | CloudPath | Path], apid: int = 1048) DataFrame #
Read Az/El packet data from a list of file paths.
- Parameters:
- packet_data_filepathslist[str | Path | CloudPath]]
The list of file paths to the raw packet data
- apidint
Application Packet ID to filter for. Default is 1048 for Az/El sample packets.
- :returns: **packet_data – The configured packet data as a pandas DataFrame with restructured samples.**
- :rtype: pd.DataFrame