finesse.paths.OpticalPath

Overview

class finesse.paths.OpticalPath(path)[source]

Represents a path traversing through optical connections of a Model instance.

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 OpticalNode instance and to_comp can be any sub-class instance of Connector; 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

path : list

A list of 2-tuples containing the path data; first element stores the OpticalNode, second element stores the component this node feeds into.

Properties

OpticalPath.data

A handle to the underlying path data.

OpticalPath.nodes_only

The path data with only the OpticalNode sequence.

OpticalPath.components_only

The path data with only the component sequence.

OpticalPath.spaces

The spaces in the optical path.

OpticalPath.length

The length of the optical path.