libera_utils.packet_configs.SampleGroup#

class libera_utils.packet_configs.SampleGroup(name: str, sample_count: int, data_field_patterns: list[str], time_source: SampleTimeSource, time_field_patterns: TimeFieldMapping | None = None, epoch_time_fields: TimeFieldMapping | None = None, sample_period: timedelta | None = None)#

Bases: object

Configuration for a group of samples within a packet.

This class defines how to parse a specific group of related samples that share timing characteristics within a packet.

name#

Name of the sample group (e.g., “AXIS_SAMPLE”, “RAD_SAMPLE”, “ADGPS”). This is used to name coordinates and dimensions.

Type:

str

time_fields#

Mapping of time field patterns to their units for explicit per-sample timestamps. Use %i as placeholder for sample index in the field names.

Type:

TimeFieldMapping | None

epoch_time_fields#

Mapping of time fields to units for a single epoch timestamp. Used with sample_period to calculate sample times.

Type:

TimeFieldMapping | None

sample_period#

Fixed time period between samples, used with epoch_time_fields.

Type:

timedelta | None

data_field_patterns#

List of data field name patterns. Use %i for sample index if multiple samples.

Type:

list[str]

sample_count#

Number of samples per packet for this sample group.

Type:

int

time_source#

The source system for timestamps (e.g. ICIE, FPE, or SC).

Type:

SampleTimeSource

Attributes:
epoch_time_fields
sample_data_fields

Return the data field patterns with any %i placeholders removed (i.e.

sample_period
sample_time_dimension

Get the dimension name for this sample group.

time_field_patterns
__init__(name: str, sample_count: int, data_field_patterns: list[str], time_source: SampleTimeSource, time_field_patterns: TimeFieldMapping | None = None, epoch_time_fields: TimeFieldMapping | None = None, sample_period: timedelta | None = None) None#

Attributes

epoch_time_fields

sample_data_fields

Return the data field patterns with any %i placeholders removed (i.e. convert patterns to clean field names).

sample_period

sample_time_dimension

Get the dimension name for this sample group.

time_field_patterns

name

sample_count

data_field_patterns

time_source

property sample_data_fields: list[str]#

Return the data field patterns with any %i placeholders removed (i.e. convert patterns to clean field names)

For example, ICIE__AXIS_EL_FILT%i becomes ICIE__AXIS_EL_FILT

property sample_time_dimension: str#

Get the dimension name for this sample group.

Returns:

The dimension name, e.g. “AXIS_SAMPLE_ICIE_TIME”

Return type:

str