InvertableSplineCalibrationΒΆ

Class Arguments

Argument

Type

Default Value

input_unit

TStr

output_unit

TStr

calibration_points

TList(TList(TFloat))

Bold arguments are mandatory. For more documentation on the listed arguments refer to the class definition below. If parameters appear in this list but not in the class definition below, please recursively check the linked base classes for the definition of the parameter.

Inheritance Diagram

Inheritance diagram of atomiq.components.basics.calibration.InvertableSplineCalibration

Example Component Dictionary

   {
    "calibration_example": {
        "classname": "atomiq.components.basics.calibration.InvertableSplineCalibration",
        "arguments": {
            "input_unit": "<mandatory parameter (TStr)>",
            "output_unit": "<mandatory parameter (TStr)>",
            "calibration_points": "<mandatory parameter (TList(TList(TFloat)))>"
        }
    }
}

Class Description

class atomiq.components.basics.calibration.InvertableSplineCalibration(*args, **kwargs)

Bases: InvertableCalibration, SplineCalibration

Calibration via data points that can be inverted

Data points are interpolated with linear splines. For the inversion to work, both x and y of the calibration data must be monotonous.

transform_inv(input_value)

Perform inverse transform of a value according to the calibration

Parameters:

input_value (artiq.compiler.types.TMono('float', OrderedDict())) -- value to be inversely transformed. Must be given in units of the output unit

Returns:

transformed value. The returned value is in units of the input unit

Return type:

TFloat

transform(input_value, invert=False)

Transform a value according to the calibration

Parameters:
  • input_value (artiq.compiler.types.TMono('float', OrderedDict())) -- value to be transformed

  • invert (artiq.compiler.types.TMono('bool', OrderedDict()))

Returns:

transformed value

Return type:

TFloat