finesse.model.Model.component_tree

Model.component_tree(root=None, show_detectors=False, show_ports=False)[source]

Retrieves a tree containing the network representing the components connected to the specified root.

Parameters
rootModelElement

The component to use as the root of the tree.

show_detectorsbool, optional

Whether to show detectors in the tree. Defaults to False

show_portsbool, optional

Whether to show the ports that components and detectors are connected to. Defaults to False.

Returns
TreeNode

The root tree node, with connected components as branches.

Raises
ValueError

If the specified root is not a model element.