finesse.analysis.actions.dc.DCFieldsSolutions

Overview

class finesse.analysis.actions.dc.DCFieldsSolutions[source]

Bases: BaseSolution

Contains the result of a DCFields action. The returned fields are the internal description of the carrier are all nodes, modes, and frequencies. Fields are defined as P=|E|^2.

Notes

The fields attribute will contain all the required information with its ordering defined by the nodes, frequencies, and homs array. For easier indexing you can access the solution directly with node names.

Select all the frequencies and modes at l1.p1.i: >>> sol[‘l1.p1.i’]

Select all the first modes at all frequencies and modes at l1.p1.i: >>> sol[‘l1.p1.i’, :, 0]

Select all the frequencies and modes at two nodes: >>> sol[(‘l1.p1.i’, ‘l1.p1.o’)]

Select all the HG02 modes at every node and frequency >>> sol[:, :, sol.homs.index([0, 2]))]

Select all the HG02 modes at every output node and every frequency >>> idx = np.array([node.split(“.”)[-1] == “o” for node in sol.nodes]) >>> sol[idx, :, sol.homs.index([0, 2])]

The frequency and mode selection must be a slice or an array of integer or boolean values.

Attributes
homslist

The Hermite-Gaussian higher order mode indices at each node, of each frequency.

nodestuple[str]

Name of nodes the fields were extracted at

frequenciesarray_like[dtype=float]

Values of the optical frequencies at each node

fieldsarray_like

Field data array with shape [nodes, frequencies, HOMs.shape[0]]

Methods

DCFieldsSolutions.selector(key)