libera_utils.l1a.l1a_packet_configs.DayCoveragePolicy#

class libera_utils.l1a.l1a_packet_configs.DayCoveragePolicy(*, mode: CoverageMode, window_coverage_frac: float | None = None)#

Bases: BaseModel

Completeness rule for one APID.

Variables:
  • mode (CoverageMode) – FRACTION requires the data to reach both edges of the buffered day window and to cover at least window_coverage_frac of it. PRESENCE passes both checks as soon as any data overlaps the buffered day window, and takes no fraction.

  • window_coverage_frac (float | None) – Minimum covered fraction of the buffered day window [D - B, D + 1 + B]. Required for FRACTION.

Raises:

pydantic_core.ValidationError – If a FRACTION policy omits window_coverage_frac, a PRESENCE policy carries it, or it falls outside (0, 1].

__init__(**data: Any) → None#

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Attributes

model_computed_fields

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra

Get extra fields set during validation.

model_fields

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

_validate_fraction() → DayCoveragePolicy#

Require a fraction in (0, 1] for FRACTION and none for PRESENCE.

model_computed_fields = {}#
model_config = {'frozen': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property model_extra: Dict[str, Any] | None#

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields = {'mode': FieldInfo(annotation=CoverageMode, required=True), 'window_coverage_frac': FieldInfo(annotation=Union[float, NoneType], required=False, default=None)}#
property model_fields_set: set[str]#

Returns the set of fields that have been explicitly set on this model instance.

Returns:

A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.