finesse.gaussian.optimise_HG00_q_scipy

finesse.gaussian.optimise_HG00_q_scipy(e, q, homs, accuracy=1e-06, fix_spot_size=False, astigmatic=False, full_output=False, method='nelder-mead')[source]

Computes the optimal complex beam parameter to describe an optical field, described by a vector of HG modes. This optimisation assumes that the field to be optimised is approximately a HG00 beam shape.

The algorithm maximises the amount of HG00 present in a beam by varying the x and y complex beam parameter.

Parameters
earray_like

Array of complex HG mode amplitudes to be optimised

q[complex | finesse.BeamParam] or tuple

x and y complex beam parameter basis that e is in. If a singular value is given qx=qy, else (qx, qy) should be provided.

homslist(tuple(n, m))

List of HG mode indices for each element in e

accuracyfloat, optional

level to suppress HG20 and HG02 modes to

fix_spot_sizebool, optional

When True a non-linear optimiser is used and keeps the spot sized fixed to its current value. Useful for when you expect just the curvature of a beam to be changing. Default, False.

astigmaticbool, optional

When True the x and y beam parameters will be optimised separately. If you know they should be equal then set this to False. Default False.

full_outputbool, optional

When True, a dictionary with the optimized array of HG modes and the result returned by the scipy minimize function is returned. Default False.

methodstr, optional

Optimization method used by scipy, Default ‘nelder-mead’

Returns
qx, qy(finesse.BeamParam, finesse.BeamParam)

Optimised beam parameters

retdict

When full_output is True, a dictionary with entries

  • ‘field’: optimized GH mode amplitude array

  • ‘res’: Scipy fit result