finesse.model.Model.connect¶
- Model.connect(A, B, L=0, nr=1, *, delay=None, name=None, connector=None)[source]¶
Connects two ports in a model together. The ports should be of the same type, e.g. both optical ports.
This method will also accept components from the user, in such cases it will loop through the ports and use the first one in .ports that is currently unconnected.
- Parameters
-
Index of compA port to connect from.
Second component to connect (target).
name : str, optional
L : float, optional
nr : float, optional
Index of refraction of newly created
Space
.connector :
Space
orWire
, optionaldelay : float, optional
Delay time for Wires,
- Raises
Exception
If matrix has already been built, either of compA or compB are not present in the model, either of portA or portB are already connected or either of portA or portB are not valid options at the specified component(s).