finesse.gaussian.transform_beam_param

finesse.gaussian.transform_beam_param(ABCD, q1, nr1=1, nr2=1)[source]

Transforms a beam parameter q1 by the matrix ABCD.

The value of the new beam parameter returned is given by the Kogelnik transformation,

\[q_2 = n_{r,2} \frac{A \frac{q_1}{n_{r,1}} + B}{ C \frac{q_1}{n_{r_1}} + D}, \]

where \(A\), \(B\), \(C\), \(D\) are the corresponding elements of the ABCD matrix, and \(n_{r,1}\), \(n_{r,2}\) are the refractive indices of the source and target media respectively.

Note

The method Model.propagate_beam() should be preferred over this in most cases, as it will automatically take into account refractive indices of spaces. With that method, you can simply specify the input and output nodes associated with the component you want to transform over and get back a PropagationSolution instance on which you can find the resulting beam parameter with PropagationSolution.q().

This function is more intended for array-calculations (i.e. where q1 is an array of beam parameters or complex values) and cases where ABCD is a manually defined matrix.

Parameters
ABCDnumpy.ndarray

A 2D numpy array of shape (2, 2) containing the ABCD matrix elements. Note that this can be a matrix of symbolic elements or a matrix of numbers.

q1complex, BeamParam, symbolic, array-like

A complex number, BeamParam instance or complex symbolic expression, representing the beam parameter to be transformed by ABCD. This can also be an array of beam parameters (which in turn can be symbolic or numeric again).

nr1float, symbolic

The index of refraction of the source medium.

nr2float, symbolic

The index of refraction of the target medium.

Returns
outcomplex, BeamParam, symbolic, numpy.ndarray

The transformed beam parameter. If ABCD is symbolic then a symbolic expression is returned. If q1 is a BeamParam instance then a new BeamParam instance is returned. Note that these two conditions couple such that a BeamParam with a symbolic q attribute may be returned.

If q1 is an array of beam parameters then an array of the above types will be returned (dependent upon whether q1 contains symbolic or numeric beam parameters).