linewidth

typhon.spectroscopy.linewidth(f, a)[source]

Calculate the full-width at half maximum (FWHM) of an absorption line.

Parameters:
  • f (ndarray) – Frequency grid.

  • a (ndarray) – Line properties (e.g. absorption coefficients or cross-sections).

Returns:

Linewidth.

Return type:

float

Examples

>>> f = np.linspace(0, np.pi, 100)
>>> a = np.sin(f)**2
>>> linewidth(f, a)
1.571048056449009