finesse.solutions.beamtrace.PropagationSolution.q¶
- PropagationSolution.q(at, which=None)[source]¶
Beam parameter at a given location of the path.
- Parameters
at :
OpticalNode
orPort
orConnector
or strThe location in the path at which to get the beam parameter. This can be an optical node, a port, a connector or the name of a connector.
which : str, optional; default: None
The direction of the beam parameter to retrieve. Only used if at is a connector or name of a connector. Valid options are “in” for the input node of the connector, or “out” for the output node of the connector.
- Returns
q :
BeamParam
If at is an
OpticalNode
instance, or aConnector
object and which was specified, then the beam parameter corresponding to this node is returned.qs : dict
Otherwise, a dictionary of the input and output node mappings to their respective beam parameters is returned.
- Raises
ke : KeyError
If at is a node or port which does not exist within the solution.
ve : ValueError
If which is an invalid argument (see parameters above). Or if at corresponds to a non-existent connector (or a connector not in the traced path).
te : TypeError
If at is not an
OpticalNode
,Port
,Connector
or string.