finesse.simulations.graph.tools.get_cavities

finesse.simulations.graph.tools.get_cavities(graph: OperatorGraph)[source]

Get the cavities (self loops) and their coupling status from an OperatorGraph.

Parameters
graphOperatorGraph

The OperatorGraph representing the system.

Returns
cavitiestuple

A tuple of node indices which have self loops in the graph.

coupledtuple

A tuple indicating the whether a self loop is coupled to another or not