slmsuite.misc.fitfunctions.lorentzian

lorentzian(x, x0, a, c, Q)[source]

For fitting an offset resonance.

\[y(x) = c + \frac{a}{1 + \left[\frac{x - x_0}{x_0/2Q}\right]^2}.\]

\(Q\) is the quality factor of the resonance.

Parameters
  • x (numpy.ndarray) – Points to fit upon.

  • x0 (float) – Center wavelength.

  • a (float) – Amplitude.

  • c (float) – constant offset.

  • Q (float) – Quality factor.

Returns

y – Lorentzian fit evaluated at all x.

Return type

numpy.ndarray