pyarts3.spectroscopy

Functions directly related to spectroscopy.

pyarts3.spectroscopy.boltzmann_level(elow, t, t0)[source]

Computes the Boltzmann level function

\[K_1 = \exp\left(\frac{E_l \left[T-T_0\right]}{k_B T T_0}\right),\]

where \(k_B\) is the Boltzmann constant.

All ndarrays must be of same size, any of the inputs can be ndarray

Parameters:
  • elow (float or ndarray) – Lower state energy level [J]

  • t (float or ndarray) – Temperature [Kelvin]

  • t0 (float or ndarray) – Line temperature [Kelvin]

Returns

K1 (like input): How much Boltzmann statistics feeds the transition

\[S(T) = S(T_0)K_1K_2 \frac{Q(T_0)}{Q(T)}\]
pyarts3.spectroscopy.doppler_broadening(t, f0, m)[source]

Calculate the doppler broadening half-width half-maximum

\[\gamma_D(T) = \sqrt{ \frac{2\log(2) k_B T}{mc^2} } f_0\]
Parameters:
  • t (float or ndarray) – Temperature [Kelvin]

  • f0 (float or like temperature) – Central frequency [Hertz/invcm]

  • m (float or like temperature) – Mass [kilogram]

Returns

hwhm (like temperature): Half-width half-maximum [Hertz/invcm]

pyarts3.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
pyarts3.spectroscopy.stimulated_emission(f0, t, t0)[source]

Computes the stimulated emission function

\[K_2 = \frac{1 - \exp\left( - \frac{h f_0}{k_B T}\right)} {1 - \exp\left( - \frac{h f_0}{k_B T_0}\right)},\]

with Planck constant \(h\) and Boltzmann constant \(k_B\).

Parameters:
  • f0 (float or ndarray) – Line frequency [Hz]

  • t (float or ndarray) – Temperature [Kelvin]

  • t0 (float or ndarray) – Line temperature [Kelvin]

Returns

K2 (like input): How stimulated the emission is

\[S(T) = S(T_0)K_1K_2 \frac{Q(T_0)}{Q(T)}\]