Commands

Commands set some properties of the model or its elements. Some commands may only be specified once per model, others multiple times.

fsig

This element represents the signal frequency (fsig) used in a model. It is a unique element, which means only one can be added to any given model. This is done automatically with the name fsig. It has a single parameter f for the frequency of the signal.

Syntax:
fsig(f)
Required:

name: Name of this element

f: Signal frequency to use in a model [Hz]. If set to None then no signal frequencies will be modelled in the simulation.

lambda
Syntax:
lambda(value)
modes

Select the HOM indices to include in the model.

Syntax:
modes(modes=none, maxtem=none, include=none, remove=none)
Optional:

modes: Identifier for the mode indices to generate. This can be: - An iterable of mode indices, where each element in the iterable must unpack to two integer convertible values. - A string identifying the type of modes to include, must be one of “off”, “even”, “odd”, “tangential” (or “x”) or “sagittal” (or “y”).

maxtem: Optional maximum mode order.

include: A single mode index pair, or an iterable of mode indices, to include. Each element must unpack to two integer convertible values.

remove: A single mode index pair, or an iterable of mode indices, to remove. Each element must unpack to two integer convertible values.

Note: at least one of modes, maxtem, include and exclude must be specified.

Connect multiple components together in one quick command. In many models a collection of components just need to be connected together without having to specify each port exactly. This command accepts multiple components as arguments, each is connected to the next. Interally the link command is creating spaces and wires between components but giving them automatically generated names. Therefore, the link command is useful when you are not interested in what the spaces or wires are called, which is often the case in readout paths or signal feedback loops.

Syntax:
link(*args, verbose=false)
Required:

*args: Separate arguments of either components or ports. A float value will create a space or wire with the provided length or time delay.

Optional:

verbose: Print out what the link command is doing

See Also:

space

tem

Distributes power into the mode HGnm.

Syntax:
tem(laser, n, m, factor, phase=0.0)
Required:

laser: The laser to set mode power for.

n, m: Mode indices.

factor: Relative power factor, modes with equal factor will have equivalent power distributed to them.

Optional:

phase: Phase offset for the field, in degrees.