finesse.exceptions module
Custom exception types raised by different Finesse functions and class methods.
- exception finesse.exceptions.BeamTraceException(message, **kwargs)[source]
Bases:
FinesseException
- exception finesse.exceptions.BrokenDOFLinkError(message, broken_parameters: list[Parameter], **kwargs)[source]
Bases:
FinesseExceptionThrown when the links between a Degree of Freedom and the parameters it is supposed to drive are broken
- exception finesse.exceptions.ComponentNotConnected(message, **kwargs)[source]
Bases:
FinesseException
- exception finesse.exceptions.ContextualArgumentError(message, **kwargs)[source]
Bases:
FinesseExceptionAn argument error with additional context.
This allows Finesse objects to provide additional information to the user when invalid values are passed to functions and methods.
- exception finesse.exceptions.ContextualTypeError(param, value, allowed_types=None, name=None)[source]
Bases:
ContextualArgumentErrorA type error with additional information about the available types.
- exception finesse.exceptions.ContextualValueError(params: dict, extra_info: str | None = None)[source]
Bases:
ContextualArgumentErrorA value error with additional information about value(s) that caused an error.
- exception finesse.exceptions.ControlledByDOFException(message, **kwargs)[source]
Bases:
FinesseExceptionRaised when a parameter value is changed but there are other elements that are controlling what the value is.
- exception finesse.exceptions.ConvergenceException(message, **kwargs)[source]
Bases:
FinesseExceptionIndicates an algorithm has failed to converge to some requested tolerance.
- exception finesse.exceptions.DoubleConnectionError(message, **kwargs)[source]
Bases:
FinesseExceptionThrown when a connections is made to a port that is already connected
- exception finesse.exceptions.EvaluateResolvingSymbolError(message, **kwargs)[source]
Bases:
FinesseExceptionThrown when trying to evaluate a parameter that is currently resolving.
- exception finesse.exceptions.FinesseException(message, **kwargs)[source]
Bases:
ExceptionThe exception type which gets raised upon a Finesse failure.
This identifies whether the current session is interactive or not, and consequently sets the level of verbosity. This can be overridden by calling
show_tracebacks()withTrue.
- exception finesse.exceptions.IllegalSelfReferencing(message, **kwargs)[source]
Bases:
FinesseExceptionRaised by elements who do not allow self referencing for arg/kwarg values.
- exception finesse.exceptions.InvalidRTLError(message, **kwargs)[source]
Bases:
FinesseExceptionThrown when the RTL parameters of a Surface component violate energy conservation.
- exception finesse.exceptions.LostLock(message, **kwargs)[source]
Bases:
FinesseExceptionThrown when the lock is lost by the locking algorithm. This is typically an issue of:
the error signal has been lost (no longer linear, rotated into a different quadrature
The error signal slope has become too small (need more lock gain) or too large (need less lock gain)
multiple locks are competing and dragging the interferometer to an unstable state.
In such cases you can run the lock action with the flag exception_on_fail=False to ensure it returns a
finesse.analysis.actions.locks.RunLocksSolution. This solution can then be used to diagnose the issue, plot_error_signals and plot_control_signals are useful for this to see which error signals are causing an issue.
- exception finesse.exceptions.ModelAttributeError(message, **kwargs)[source]
Bases:
FinesseException
- exception finesse.exceptions.ModelClassAttributeError(target: Any, resolved_attrs: list[str], missing_name: str)[source]
Bases:
ModelAttributeErrorError indicating that a model path resolves to a class attribute.
E.g. l1.P.__dict__ or parse will resolve, but no usecase exists for referencing these class attributes in katscript.
- exception finesse.exceptions.ModelMissingAttributeError(target: Any, resolved_attrs: list[str], missing_name: str)[source]
Bases:
ModelAttributeErrorError indicating a model path was not found.
Model paths can be e.g. l1.P or s1.p1.o.
This exists mainly so it can be caught by the parser.
- exception finesse.exceptions.ModelParameterDefaultValueError(element)[source]
Bases:
FinesseExceptionError indicating a model element has no default model parameter.
Some model parameters have defaults, such that they can be referenced in kat script using e.g. myvar instead of myvar.value. This error indicates a model element without such a default was referenced directly.
- exception finesse.exceptions.ModelParameterSelfReferenceError(value, parameter)[source]
Bases:
FinesseExceptionError indicating a model parameter cannot be set to refer to itself.
- exception finesse.exceptions.NoABCDCoupling(message, **kwargs)[source]
Bases:
FinesseExceptionRaised when an ABCD coupling at a component is requested but does not exist.
- exception finesse.exceptions.NoCouplingError(message, **kwargs)[source]
Bases:
FinesseExceptionRaised when a coupling at a component is requested but does not exist.
- exception finesse.exceptions.NoLinearEquations(message, **kwargs)[source]
Bases:
FinesseExceptionThrown when a simulation has no linear equations to solve.
- exception finesse.exceptions.NodeException(message, node=None)[source]
Bases:
FinesseExceptionException associated with
Noderelated run-time errors.Objects of type NodeException store the error message as well as an optional reference to the node(s) which caused the exception to be raised.
Parameters
- messagestr
The error message.
- node
Node, optional A reference to the offending node(s), defaults to None. This can be a single node or a sequence of nodes.
- exception finesse.exceptions.NotChangeableDuringSimulation(message, **kwargs)[source]
Bases:
FinesseExceptionThrown when a parameter is attempted to be changed during a simulation but is marked as not changeable during a simulation.
- exception finesse.exceptions.ParameterLocked(message: str | None = None, par: Parameter | None = None, add_unlock_tip: bool = True, **kwargs)[source]
Bases:
FinesseException
- exception finesse.exceptions.TotalReflectionError(message, from_node=None, to_node=None)[source]
Bases:
FinesseExceptionException indicating total reflection of a beam at a component when performing beam tracing.
Parameters
- messagestr
The error message.
- from_node, to_node
Node References to the offending source and target nodes, respectively.