slmsuite.holography.analysis.fitfunctions.lorentzian#

lorentzian(x, x0, a, c, w)[source]#

For fitting a resonance.

\[y(x) = c + \frac{a}{1 + \left[\frac{x - x_0}{w}\right]^2}.\]
Parameters:
  • x (numpy.ndarray) – Points to fit upon.

  • x0 (float) – Center of the peak.

  • a (float) – Amplitude.

  • c (float) – Constant offset.

  • w (float) – Full width at half maximum (FWHM).

Returns:

y – Lorentzian fit evaluated at all x.

Return type:

numpy.ndarray