evolver.calibration.procedure.CalibrationProcedure
- class evolver.calibration.procedure.CalibrationProcedure(hardware, state=None, *args, **kwargs)[source]
- __init__(hardware, state=None, *args, **kwargs)[source]
Initialize the CalibrationProcedure.
- actions
The list of actions that can be executed in the calibration procedure. All actions are added to this list in the create_calibration_procedure method. Typically, a procedure is complete when all actions have been dispatched in sequence using the HTTP API.
- Type:
- state
The state of the calibration procedure updated as actions are executed. The state can be saved and reloaded to continue the calibration procedure if interrupted. Only state that is explicitly saved will be persisted, so it is important to save the state periodically.
- Type:
CalibrationStateModel
- hardware
The hardware that the calibration procedure will interact with.
- Type:
Notes
Dispatching an action will update the state of the calibration procedure.
The measured data that accumulates in procedure state is eventually used by the Calibrator’s Transformer class to fit a model to the data. This can be done by defining a CalculateFit action in the procedure and dispatching it. Data stored in the CalibrationProcedure state should also be periodically saved to the Calibrator’s CalibrationData class. That way CalibrationProcedure state can be saved and reloaded to continue the calibration procedure if interrupted. This can be done by defining a SaveProcedureState action in the procedure and dispatching it.
Methods
__init__(hardware[, state])Initialize the CalibrationProcedure.
add_action(action)apply()Apply the calibration by updating the calibration_file to match the saved state of the calibration procedure.
auto_assign_attrs_from_config(kwargs[, ...])Auto instance attribute assignment functionality via
cls.Configintrospection.create([config])Create an instance from a config.
dispatch(action, payload)get_action(name)get_actions()get_state(*args, **kwargs)init_descriptors(**non_config_kwargs)Automatically walk over all vars and instantiate any that are ConfigDescriptors.
post_init_vars(*args, **kwargs)A hook to override and perform additional initialization after instance attrs are assigned but before any
ConfigDescriptorare converted toclassinfoobjects.save()Save the current state of the calibration procedure, to a file.
undo()Undo the last action that was dispatched in the calibration procedure.
Attributes
classinfoReturn the class' fully qualified name.
configReturn a dict of Config populated from instance attributes.
config_jsonReturn a JSON str from a Config populated from instance attributes.
config_modelReturn an instance of Config populated from instance attributes.
descriptorReturn a
ConfigDescriptor.