finesse.paths module
Containers for paths traversed through a configuration.
- class finesse.paths.OpticalPath(path, symbolic=False)[source]
Bases:
objectRepresents a path traversing through optical connections of a
Modelinstance.The underlying data stored by instances of this class are lists of two-element tuples containing optical nodes and the components that they connect into. This list is formatted as [(from_node, to_comp)] where from_node is an
OpticalNodeinstance and to_comp can be any sub-class instance ofConnector; from_node is then an input node to to_comp.A handle to the underlying list can be obtained through accessing the property
OpticalPath.data. This is not required for iterating through the path entries however, as this class provides iterator access itself.Parameters
- pathlist
A list of 2-tuples containing the path data; first element stores the
OpticalNode, second element stores the component this node feeds into.- symbolicbool, optional
Whether to compute symbolic lengths
- property components[source]
The path data with only the component sequence.
- Getter:
Returns a list of the sequence of traversed components.
- property components_only[source]
The path data with only the component sequence.
- Getter:
Returns a list of the sequence of traversed components.
- property data[source]
A handle to the underlying path data.
- Getter:
Returns the list of 2-tuples containing the path data.
- property nodes[source]
The path data with only the
OpticalNodesequence.- Getter:
Returns a list of the sequence of traversed optical nodes.
- property nodes_only[source]
The path data with only the
OpticalNodesequence.- Getter:
Returns a list of the sequence of traversed optical nodes.
- property optical_length[source]
This returns the optical path length, i.e. the geometric length of each space scaled by its refractive index.
- Getter:
Returns the total traversed length of the optical path (in metres).
- property physical_length[source]
This returns the physical path length.
- Getter:
Returns the total length (in metres).