finesse.knm

Library of coupling coefficient data structures and calculations.

Much of the code in this sub-package exists in a Cythonised form which should only be used internally for calculating modal scattering during simulations.

For the user, the tools sub-module provides Python facing functions for calculating certain types of coupling coefficients, and scattering matrices of these, directly. The bayerhelms module also contains Python exposed functions for calculating Bayer-Helms [1] coefficients directly.

A data structure, KnmMatrix, representing a scattering matrix is documented in matrix. Objects of this type are returned whenever using functions in this library which compute coupling coefficient matrices.

See Computing arbitrary scattering matrices for details and examples on using some of the Python-facing tools in this library.

Note that these tools use the same internal C code as that which gets executed during simulations, and so will be very efficient off-the-shelf.

Sub-modules

finesse.knm.bayerhelms

Computation of modal coupling coefficients via the Bayer-Helms analytic formalism.

finesse.knm.matrix

Scattering matrix data structure and associated functions for constructing different formats of this object.

finesse.knm.tools

Tools for calculating coupling coefficients and modal scattering matrices of different types.