SweepModel#
- class SweepModel(*, parameter, data, **extra_data)#
Bases:
BaseModel
Pydantic sweep model.
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:
exa.common.api.model.sweep_model
Attributes
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
parameter
data
Methods
Creates instance of
exa.common.control.sweep.fixed_sweep.FixedSweep
out of pydantic SweepModel.Creates pydantic SweepModel out of
exa.common.control.sweep.sweep.Sweep
instance.serialize_data
- Parameters:
parameter (ParameterModel) –
extra_data (Any) –
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- decode()#
Creates instance of
exa.common.control.sweep.fixed_sweep.FixedSweep
out of pydantic SweepModel.- Return type:
- classmethod encode(sweep)#
Creates pydantic SweepModel out of
exa.common.control.sweep.sweep.Sweep
instance.- Parameters:
sweep (Sweep) –
- Return type: