finesse.simulations.graph.tools.ModelOperatorPicture.solve

ModelOperatorPicture.solve(node_index: int, source_nodes: Iterable[int]) Symbol[source]

Computes a symbolic solutions for a given node within the graph. This does not solve for the actual values of the symbols, linear operatores will be left as is. No actual linear operation inversions will take place.

Parameters
node_indexint|str

The index of the node to solve for, or string name of node, see. self.node_index.

source_nodesIterable[int or str]

The indices of source nodes indices or string names that should be included

Returns
finesse.symbols.Symbol

The solution for the specified node

Examples

Plot network but shade out sink nodes >>> import finesse >>> from finesse.simulations.graph.tools import ModelOperatorPicture >>> model = finesse.script.parse(‘’’ … l l1 … bs bs … m itmx … m itmy … link(l1, 1, bs.p1) … link(bs.p2, 1, itmy) … link(bs.p3, 1, itmx) … ‘’’) >>> op = ModelOperatorPicture(model, True,True) >>> op.graph.plot(alpha_nodes=op.graph.sink_nodes());

Or just ignore sink nodes all together >>> op.graph.plot(ignore_nodes=[1, 2, 3]);