finesse.knm.matrix.KnmMatrix
¶
Overview
- class finesse.knm.matrix.KnmMatrix(const int[:, ::1] modes, comp_name=u'', kdir=u'')¶
Bases:
object
Higher-Order-Mode scattering matrix container. Essentially a wrapper around a 2D NumPy array with methods for conveniently accessing specific couplings and plotting the matrix as a color-mesh.
The underlying
numpy.ndarray
object can be accessed via thedata
attribute.Construction of KnmMatrix objects should, generally, not be performed manually. Objects of this type are the return type of the general scattering matrix computing routines, see
make_scatter_matrix()
. To make a KnmMatrix object from a pre-existing matrix of complex coupling coefficients, useKnmMatrix.from_buffer()
.- Parameters:
- modesarray-like
A 2D array, or memory-view to the array, of the mode indices associated with the scattering matrix.
- comp_namestr, optional; default: “”
Name of the component associated with the matrix (if any).
- kdirstr, optional; default: “”
A string representing the coupling direction of the matrix, e.g. “11” for a reflection at the first surface of a mirror-like optic.
Methods
|
|
|
Construct a KnmMatrix object from a pre-existing 2D array buffer. |
|
Retrieves the coupling coefficient corresponding to the key, returning default if this key is invalid. |
|
Constuct a KnmMatrix where each element is (complex) zero. |
|
Plots the coupling coefficient matrix as a color-mesh. |