lorentzian#

torchspin.lorentzian(x, x0, fwhm, diff=0, phase=0.0)[source]#

Area-normalized Lorentzian absorption (and dispersion) lineshape.

Parameters:
  • x (array_like) – Abscissa values.

  • x0 (float) – Center.

  • fwhm (float) – Full width at half maximum. Must be > 0.

  • diff (int, optional) – Derivative order: -1, 0, 1, or 2. Default 0.

  • phase (float, optional) – Phase rotation in radians. Default 0.

Returns:

  • ya (ndarray) – Absorption (or phase-rotated) lineshape.

  • yd (ndarray) – Dispersion lineshape.

Return type:

tuple