finesse.knm.rev_all_gouy

finesse.knm.rev_all_gouy(const double complex[:, ::1] knm_mat, const int[:, ::1] homs, double complex qx1, double complex qy1, double complex qx2, double complex qy2, double complex[:, ::1] out=None)

Adjust the phase of all coupling coefficients in the matrix knm_mat with respect to the Gouy phases.

This is required for \(k_{nmn'm'}\) calculations because in Finesse the Gouy phase is added explicitly to the amplitude coefficients in a Space whereas the coupling coefficients are derived using a formula in which the Gouy phase resides in the equation for the spatial profile.

Parameters

knm_mat : contiguous array

The matrix of coupling coefficients.

homs : contiguous array

Array of HG modes that the couplings were computed between, formatted as [(n0, m0), (n1, m1), …].

qx1 : np.complex128

Input beam parameter in tangential plane.

qy1 : np.complex128

Input beam parameter in sagittal plane.

qx2 : np.complex128

Output beam parameter in tangential plane.

qy2 : np.complex128

Output beam parameter in sagittal plane.

out : contiguous array, optional

Optional matrix in which store the computed results. If not specified then a new numpy.ndarray is returned.

Returns

knm_matrix : numpy.ndarray

The matrix of coupling coefficient values, with reversed Gouy phases, as a numpy array. If out is specified then this array object is returned.