finesse.knm.bayerhelms module
Computation of modal coupling coefficients via the Bayer-Helms analytic formalism.
- finesse.knm.bayerhelms.compute_bayerhelms_coeff(qx1, qx2, qy1, qy2, double xgamma, double ygamma, int n1, int m1, int n2, int m2, double nr=1.0, double wavelength=1064e-9, bool reverse_gouy=False)[source]
Computes the coupling coefficient, via Bayer-Helms [33], from mode (n1, m1) -> mode (n2, m2).
Note
Use
make_bayerhelms_matrix()to compute a scattering matrix of these coefficients rather than calling this function in a loop.Parameters
- qx1
BeamParamor complex Input beam parameter in the tangential plane.
- qx2
BeamParamor complex Output beam parameter in the tangential plane.
- qy1
BeamParamor complex Input beam parameter in the sagittal plane.
- qy2
BeamParamor complex Output beam parameter in the sagittal plane.
- xgammafloat
Misalignment angle in the tangential plane (in radians).
- ygammafloat
Misalignment angle in the sagittal plane (in radians).
- n1int
Input tangential mode index.
- m1int
Input sagittal mode index.
- n2int
Output tangential mode index.
- m2int
Output sagittal mode index.
- nrfloat, optional; default: 1.0
Refractive index of the associated medium.
- wavelengthfloat, optional; default: 1064 nm
Wavelength of the beam (in metres).
Returns
- coeffcomplex
The complex coupling coefficient for the specified mode coupling.
- qx1
- finesse.knm.bayerhelms.make_bayerhelms_matrix(qx1, qx2, qy1, qy2, double xgamma, double ygamma, double nr=1.0, double wavelength=1064e-9, bool reverse_gouy=False, bool parallel=True, **mode_selection_kwargs)[source]
Constructs and computes a coupling coefficient scattering matrix using the Bayer-Helms [33] analytic formalism.
See the function
make_modes()for the arguments which should be passed via mode_selection_kwargs.Parameters
- qx1
BeamParamor complex Input beam parameter in the tangential plane.
- qx2
BeamParamor complex Output beam parameter in the tangential plane.
- qy1
BeamParamor complex Input beam parameter in the sagittal plane.
- qy2
BeamParamor complex Output beam parameter in the sagittal plane.
- xgammafloat
Misalignment angle in the tangential plane (in radians).
- ygammafloat
Misalignment angle in the sagittal plane (in radians).
- nrfloat, optional; default: 1.0
Refractive index of the associated medium.
- wavelengthfloat, optional; default: 1064 nm
Wavelength of the beam (in metres).
- reverse_gouybool, optional
Removing Gouy phase terms from calculated matrix
- parallelbool, optional; default: True
Whether to enable multi-threaded execution via OpenMP. The number of threads used scales with the number of modes; bounded by the maximum thread count as given by
omp_get_max_threads.- mode_selection_kwargskeyword arguments
See
make_modes().
Returns
Examples
- qx1