M2_fit

laserbeamsize.m2_fit.M2_fit(z, d, lambda0, strict=False, z0=None, d0=None)[source]

Return the hyperbolic fit to the supplied diameters.

Follows ISO 11146-1 section 9 but a, b, and c have been replaced by beam parameters d0, z0, and Theta. The equation for the beam diameter d(z) is

d(z)**2 = d0**2 + Theta**2 * (z - z0)**2

A non-linear curve fit is done to determine the beam parameters and the standard deviations of those parameters. The beam parameters are returned in one array and the errors in a separate array:

d0: beam waist diameter [m]
z0: axial location of beam waist [m]
Theta: full beam divergence angle [radians]
M2: beam propagation parameter [-]
zR: Rayleigh distance [m]

When strict==True, an estimate is made for the location of the beam focus and the Rayleigh distance. These values are then used to divide the measurements into three zones:

* those within one Rayleigh distance of the focus,
* those between 1 and 2 Rayleigh distances, and
* those beyond two Rayleigh distances.

values are used or unused depending on whether they comply with a strict reading of the ISO 11146-1 standard which requires:

... measurements at at least 10 different z positions shall be taken.
Approximately half of the measurements shall be distributed within
one Rayleigh length on either side of the beam waist, and approximately
half of them shall be distributed beyond two Rayleigh lengths
from the beam waist.
Parameters:
  • z – array of axial position of beam measurements [m]

  • d – array of beam diameters [m]

  • lambda0 – wavelength of the laser [m]

  • strict – (optional) boolean for strict usage of ISO 11146

  • z0 – (optional) location of beam waist [m]

  • d0 – (optional) diameter of beam waist [m]

Returns:

params – [d0, z0, Theta, M2, zR] errors: [d0_std, z0_std, Theta_std, M2_std, zR_std] used: boolean array indicating if data point is used