libera_utils.packet_configs.PacketConfiguration#
- class libera_utils.packet_configs.PacketConfiguration(packet_apid: ~libera_utils.constants.LiberaApid, packet_time_fields: ~libera_utils.packet_configs.TimeFieldMapping, sample_groups: list[~libera_utils.packet_configs.SampleGroup] = <factory>, aggregation_groups: list[~libera_utils.packet_configs.AggregationGroup] = <factory>, packet_definition_config_key: str = 'LIBERA_PACKET_DEFINITION', packet_time_source: ~libera_utils.packet_configs.SampleTimeSource = SampleTimeSource.ICIE, packet_generator_kwargs: dict = <factory>)#
Bases:
ABCAbstract base class for packet configurations.
All packet configurations must subclass this and will be automatically registered when decorated with @register_packet_config.
This class defines how to parse packets that may contain multiple groups of samples with their own timestamps, allowing for proper expansion and reshaping of the data.
- packet_apid#
The APID (Application Process Identifier) for the packet type
- Type:
- packet_time_fields#
Mapping of packet timestamp fields to their time units for multipart_to_dt64 conversion.
- Type:
- sample_groups#
List of sample group configurations for this packet type.
- Type:
- aggregation_groups#
List of aggregation group configurations for this packet type.
- Type:
- packet_definition_config_key#
Configuration key to fetch the packet definition path from config. Defaults to “LIBERA_PACKET_DEFINITION”.
- Type:
- packet_time_source#
The time source for packet timestamps.
- Type:
- packet_generator_kwargs#
Additional keyword arguments passed to the packet generator in space_packet_parser. Default is no additional kwargs.
- Type:
- Attributes:
packet_time_coordinateGet the packet time coordinate name following the consistent pattern.
Methods
get_sample_group(name)Get a sample group by name
- __init__(packet_apid: ~libera_utils.constants.LiberaApid, packet_time_fields: ~libera_utils.packet_configs.TimeFieldMapping, sample_groups: list[~libera_utils.packet_configs.SampleGroup] = <factory>, aggregation_groups: list[~libera_utils.packet_configs.AggregationGroup] = <factory>, packet_definition_config_key: str = 'LIBERA_PACKET_DEFINITION', packet_time_source: ~libera_utils.packet_configs.SampleTimeSource = SampleTimeSource.ICIE, packet_generator_kwargs: dict = <factory>) None#
Methods
get_sample_group(name)Get a sample group by name
Attributes
Get the packet time coordinate name following the consistent pattern.
- get_sample_group(name: str) SampleGroup#
Get a sample group by name