es_sfgtools.data_models.metadata.benchmark module

class es_sfgtools.data_models.metadata.benchmark.BatteryVoltage(*, date: Annotated[datetime, Ge(ge=datetime.datetime(1901, 1, 1, 0, 0))], voltage: Annotated[float, Ge(ge=0), Le(le=20)])

Bases: AttributeUpdater, BaseModel

date: datetime
model_computed_fields = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config = {}

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

model_fields = {'date': FieldInfo(annotation=datetime, required=True, description='The date of the battery voltage reading', metadata=[Ge(ge=datetime.datetime(1901, 1, 1, 0, 0))]), 'voltage': FieldInfo(annotation=float, required=True, description='The battery voltage reading', metadata=[Ge(ge=0), Le(le=20)])}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

voltage: float
class es_sfgtools.data_models.metadata.benchmark.Benchmark(*, name: str, benchmarkID: str | None = '', aPrioriLocation: Location | None = None, start: Annotated[datetime | None, Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))] = None, end: Annotated[datetime | None, Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))] = None, dropPointLocation: Location | None = None, transponders: List[Transponder] | None = None)

Bases: AttributeUpdater, BaseModel

aPrioriLocation: Location | None
benchmarkID: str | None
dropPointLocation: Location | None
end: datetime | None
get_transponder_by_datetime(dt: datetime) Transponder | None

Get the transponder for a given datetime.

Parameters:

dt (datetime) – The datetime to get the transponder for.

Returns:

The transponder, or None if no transponder is found for the given datetime.

Return type:

Optional[Transponder]

model_computed_fields = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config = {}

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

model_fields = {'aPrioriLocation': FieldInfo(annotation=Union[Location, NoneType], required=False, default=None, description='The a priori location of the benchmark'), 'benchmarkID': FieldInfo(annotation=Union[str, NoneType], required=False, default='', description='The benchmark ID'), 'dropPointLocation': FieldInfo(annotation=Union[Location, NoneType], required=False, default=None, description='The drop point location of the benchmark'), 'end': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The end date of the benchmark', metadata=[Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))]), 'name': FieldInfo(annotation=str, required=True, description='The name of the benchmark'), 'start': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The start date of the benchmark', metadata=[Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))]), 'transponders': FieldInfo(annotation=Union[List[Transponder], NoneType], required=False, default_factory=list, description='The transponders attached to the benchmark')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

name: str
start: datetime | None
transponders: List[Transponder] | None
class es_sfgtools.data_models.metadata.benchmark.ExtraSensors(*, type: str, serialNumber: str, model: str)

Bases: AttributeUpdater, BaseModel

model: str
model_computed_fields = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config = {}

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

model_fields = {'model': FieldInfo(annotation=str, required=True, description='The model of the extra sensor'), 'serialNumber': FieldInfo(annotation=str, required=True, description='The serial number of the extra sensor'), 'type': FieldInfo(annotation=str, required=True, description='The type of the extra sensor')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

serialNumber: str
type: str
class es_sfgtools.data_models.metadata.benchmark.TAT(*, value: Annotated[float, Ge(ge=0), Le(le=1000)], start: Annotated[datetime | None, Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))] = None, end: Annotated[datetime | None, Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))] = None)

Bases: AttributeUpdater, BaseModel

end: datetime | None
model_computed_fields = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config = {}

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

model_fields = {'end': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The end date of the TAT', metadata=[Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))]), 'start': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The start date of the TAT', metadata=[Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))]), 'value': FieldInfo(annotation=float, required=True, description='Turn around time (TAT) in ms', metadata=[Ge(ge=0), Le(le=1000)])}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

start: datetime | None
value: float
class es_sfgtools.data_models.metadata.benchmark.Transponder(*, address: str, tat: List[TAT], start: Annotated[datetime | None, Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))] = None, end: Annotated[datetime | None, Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))] = None, uid: str | None = None, model: str | None = None, serialNumber: str | None = None, batteryCapacity: str | None = None, notes: str | None = None, batteryVoltage: List[BatteryVoltage] | None = None, extraSensors: List[ExtraSensors] | None = None)

Bases: AttributeUpdater, BaseModel

address: str
batteryCapacity: str | None
batteryVoltage: List[BatteryVoltage] | None
end: datetime | None
extraSensors: List[ExtraSensors] | None
get_tat_by_datetime(dt: datetime) float | None

Get the turn around time (TAT) for a given datetime.

Parameters:

dt (datetime) – The datetime to get the TAT for.

Returns:

The TAT value, or None if no TAT is found for the given datetime.

Return type:

Optional[float]

model: str | None
model_computed_fields = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config = {}

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

model_fields = {'address': FieldInfo(annotation=str, required=True, description='The address of the transponder'), 'batteryCapacity': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The battery capacity of the transponder, e.g 4 Ah'), 'batteryVoltage': FieldInfo(annotation=Union[List[BatteryVoltage], NoneType], required=False, default_factory=list, description='The battery voltage of the transponder, including date and voltage'), 'end': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The end date of the transponder (if removed)', metadata=[Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))]), 'extraSensors': FieldInfo(annotation=Union[List[ExtraSensors], NoneType], required=False, default_factory=list, description='Extra sensors attached to the transponder'), 'model': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The model of the transponder'), 'notes': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Additional notes about the transponder or deployment'), 'serialNumber': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The serial number of the transponder'), 'start': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The start date of the transponder', metadata=[Gt(gt=datetime.datetime(1901, 1, 1, 0, 0))]), 'tat': FieldInfo(annotation=List[TAT], required=True, description='The turn around time (TAT) of the transponder'), 'uid': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The UID of the transponder')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

notes: str | None
serialNumber: str | None
start: datetime | None
tat: List[TAT]
uid: str | None