evolver.hardware.interface.HardwareDriver._transform
- HardwareDriver._transform(transformer: str, func: str, x: Any, vial: int = None, fallback=None)[source]
Helper func to reduce boilerplate when transforming input and output data.
See
evolver.calibration.interface.Transformer.convert_to()for advice on which transformer and function to use for hardware transformations.- Parameters:
transformer (str) – The name of the transformer to use. This is
typically – either
input_transformeroroutput_transformer.func (str) – The name of the function to call on the transformer. This is typically either
convert_fromorconvert_to.x (Any) – The input data to transform. vial (int, optional): The vial
transformation. (index to use for the) – Defaults to None for a global transfomer.
fallback (Any, optional) – The value to return if the transformation fails.