ObservationBase#

class ObservationBase(*, dut_field, value, unit, uncertainty=None, invalid=False)#

Bases: PydanticBase

Abstract base class of the observation models.

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.

Module: iqm.station_control.interface.models.observation

Attributes

model_config

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

dut_field

Name of the property the observation is about.

value

Value of the observation.

unit

SI unit of the value.

uncertainty

Uncertainty of the observation value.

invalid

Flag indicating if the object is invalid.

Methods

Parameters:
dut_field: str#

Name of the property the observation is about.

value: bool | str | int | float | complex | ndarray#

Value of the observation.

unit: str#

SI unit of the value. Empty string means the value is dimensionless.

uncertainty: int | float | complex | ndarray | None#

Uncertainty of the observation value. None means unknown.

invalid: bool#

Flag indicating if the object is invalid. Automated systems must not use invalid objects.

model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'ser_json_inf_nan': 'constants', 'validate_assignment': True, 'validate_default': True}#

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