libera_utils.l1a.l1a_packet_configs.DayCoveragePolicy#
- class libera_utils.l1a.l1a_packet_configs.DayCoveragePolicy(*, mode: CoverageMode, window_coverage_frac: float | None = None)#
Bases:
BaseModelCompleteness rule for one APID.
- Variables:
mode (CoverageMode) –
FRACTIONrequires the data to reach both edges of the buffered day window and to cover at leastwindow_coverage_fracof it.PRESENCEpasses 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 forFRACTION.
- Raises:
pydantic_core.ValidationError – If a
FRACTIONpolicy omitswindow_coverage_frac, aPRESENCEpolicy 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
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Get extra fields set during validation.
Returns the set of fields that have been explicitly set on this model instance.
- _validate_fraction() DayCoveragePolicy#
Require a fraction in
(0, 1]forFRACTIONand none forPRESENCE.
- 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)}#