AnalogTimeLane

class caqtus.types.timelane.AnalogTimeLane(values: Iterable)

Bases: TimeLane[Expression | Ramp]

A time lane that represents analog values changing over time.

The values of an analog time lane can be a placeholder expression or a ramp. The placeholder expression represents a values that is constant for the given steps. The ramp represents a linear change from the previous step to the next step.

The conditions below are not checked by the class, but code that evaluates the lane should enforce them:

  1. A ramp should not be the first or last value of the lane.

  2. There should not be two consecutive ramps in the lane. Use a single ramp block

    spanning multiple steps instead.

  3. Expressions representing values with units should all have the same dimension

    for a given lane.

Examples:

from caqtus.session.shot import AnalogTimeLane
from caqtus.types.expression import Expression

# Creates an analog time lane with known values
lane = AnalogTimeLane(
    [Expression("0 MHz")]
    + [Ramp()] * 2
    + [Expression("10 MHz")]
)

# Creates an analog time lane with a placeholder expression
lane = AnalogTimeLane([Expression("2 * x"), Expression("y")])