CalibratedAnalogMapping

class caqtus.device.sequencer.channel_commands.CalibratedAnalogMapping(
input_: ChannelOutput,
input_units,
output_units,
measured_data_points: Iterable[tuple[float, float]],
)

Bases: TimeIndependentMapping

Maps its input to an output quantity by interpolating a set of points.

This mapping is useful for example when one needs to convert an experimentally measurable quantity (e.g. the frequency sent to an AOM) as a function of a control parameter (e.g. the voltage sent to the AOM driver). In this example, we need to know which voltage to apply to the AOM driver to obtain a given frequency. This conversion is defined by a set of points (x, y) where x is the input quantity and y is the output quantity. In the example above, x would be the frequency and y would be the voltage, because for a given frequency, we need to know which voltage to apply to the AOM driver.

input_units

The units of the input quantity

Type:

str | None

input_

Describe the input argument of the mapping.

Type:

caqtus.device.sequencer.channel_commands.channel_output.ChannelOutput

output_units

The units of the output quantity

Type:

str | None

measured_data_points

tuple of (input, output) tuples.

Type:

tuple[tuple[float, float], …]

The points will be rearranged to have the inputs sorted.
inputs() tuple[ChannelOutput]

Returns the input values of the mapping.

pop(index: int)

Remove a data point from the mapping.

insert(index: int, input_: float, output: float)

Insert a data point into the mapping.

evaluate(
required_time_step: TimeStep,
prepend: int,
append: int,
shot_context: ShotContext,
) DimensionedSeries[float64]

Evaluate the output of a channel with the required parameters.

Parameters:
  • required_time_step – The time step in which to evaluate the output, in ns.

  • prepend – The number of time steps to add at the beginning of the output.

  • append – The number of time steps to add at the end of the output.

  • shot_context – Contains information about the current to evaluate the output.