finesse.detectors.knmdetector.KnmDetector
¶
Overview
- class finesse.detectors.knmdetector.KnmDetector(name, *args, **kwargs)[source]¶
Bases:
Detector
Direct probe of coupling coefficients at a component.
This detector has several “modes” which depend upon the values given for the mode indices n1, m1 and n2, m2. If:
all of n1, m1, n2, m2 are specified then the detector will output a single complex coefficient corresponding to the coupling from
(n1, m1) -> (n2, m2)
,just n1 and m1 are specified then it will output a vector of complex coefficients corresponding to each coupling from
(n1, m1) -> (n, m)
for each mode(n, m)
in the model,only n2 and m2 are specified then it will output a vector of complex coefficients corresponding to each coupling from
(n, m) -> (n2, m2)
for each mode(n, m)
in the model,none of n1, m1, n2, m2 are specified then the detector outputs the full matrix of complex coupling coefficients.
Hint
When using this detector in “full-matrix” mode (i.e. by not giving the values for any of the mode indices), it can be useful to combine the output with the
KnmMatrix
object to obtain a more convenient representation of the scattering matrix.An example of this is shown below, where the output of a detector of this type is wrapped using
KnmMatrix.from_buffer()
.import finesse finesse.configure(plotting=True) from finesse.knm.matrix import KnmMatrix IFO = finesse.Model() IFO.parse(''' l L0 P=1 link(L0, ITM) m ITM R=0.99 T=0.01 Rc=-2090 xbeta=0.3u s LARM ITM.p2 ETM.p1 L=4k m ETM R=0.99 T=0.01 Rc=2090 cav ARM ITM.p2 modes(x, maxtem=6) knmd K_itm_r ITM 22 ''') out = IFO.run() # Make a KnmMatrix wrapper around the output from the detector k_mat = KnmMatrix.from_buffer(out["K_itm_r"], IFO.homs) # Now we can perform operations such as plotting the scattering matrix k_mat.plot(cmap="bone");
See Computing arbitrary scattering matrices for some examples on the utility that the
KnmMatrix
object provides.- Parameters
- namestr
Name of newly created KnmDetector.
- comp
Connector
A component which can scatter modes.
- couplingstr
Coupling direction string, e.g. “11” for coupling coefficients on reflection from the front surface of a mirror.
- n1, m1, n2, m2: int or None
From (n1, m1) and To (n2, m2) mode indices of the coupling coefficient(s) to retrieve.
See above for the options.