finesse.model.Model.path

Model.path(from_node, to_node, via_node=None, symbolic=False)[source]

Retrieves an ordered container of the path trace between the specified nodes.

The return type is an OpticalPath instance which stores an underlying list of the path data (see the documentation for OpticalPath for details).

Parameters
from_nodeNode

Node to trace from.

to_nodeNode

Node to trace to.

via_nodeNode (or sequence of)

Node(s) to traverse via in the path.

symbolicbool, optional

Whether to make a symbolic calculation of path lengths

Returns
outOpticalPath

A container of the nodes and components between from_node and to_node in order.

Raises
e1NodeException

If either of from_node, to_node are not contained within the model.

e2networkx.NetworkXNoPath

If no path can be found between from_node and to_node.