Miscellaneous

Contents

Miscellaneous#

Set command#

The set command is used for setting parameters. The components of set are:

parameter     # [String] Parmeter(s) to vary.
value         # [Expression] Value to set.

In the value expression, parameter can be used for the current value of the parameter being changed and self can be used for the lattice element whose parameter is being changed. Example:

- B1a:
    kind: Bend
    BendP:
      e1: 0.1
      g_ref: 0.02

- set:
    parameter: B1.*>BendP.e1
    value: 2*parameter + atan(self.BendP.g_ref)

In this example, the BendP.e1 parameter of all elements whose name begins with B1 is modified. This includes element B1a.

Note: Pattern matching is not supported in the value expression.