hyperspy._components.pes_voigt module

class hyperspy._components.pes_voigt.PESVoigt

Bases: Component

Voigt component for photoemission spectroscopy data analysis.

Voigt profile component with support for shirley background, non_isochromaticity, transmission_function corrections and spin orbit splitting specially suited for photoemission spectroscopy data analysis.

\[f(x) = G(x) \cdot L(x)\]

where \(G(x)\) is the Gaussian function and \(L(x)\) is the Lorentzian function. This component uses an approximate formula by David (see Notes).

Parameters:
  • area (Parameter) – Intensity below the peak.

  • centre (Parameter) – Location of the maximum of the peak.

  • FWHM (Parameter) – FWHM = \(2 \sigma \sqrt{(2 \log(2))}\) of the Gaussian distribution.

  • gamma (Parameter) – \(\gamma\) of the Lorentzian distribution.

  • resolution (Parameter) –

  • shirley_background (Parameter) –

  • non_isochromaticity (Parameter) –

  • transmission_function (Parameter) –

  • spin_orbit_splitting (Bool) –

  • spin_orbit_branching_ratio (float) –

  • spin_orbit_splitting_energy (float) –

Notes

Uses an approximate formula according to W.I.F. David, J. Appl. Cryst. (1986). 19, 63-64. doi:10.1107/S0021889886089999

estimate_parameters(signal, E1, E2, only_current=False)

Estimate the Voigt function by calculating the momenta of the Gaussian.

Parameters:
  • signal (Signal1D instance) –

  • x1 (float) – Defines the left limit of the spectral range to use for the estimation.

  • x2 (float) – Defines the right limit of the spectral range to use for the estimation.

  • only_current (bool) – If False estimates the parameters for the full dataset.

Returns:

Exit status required for the remove_background() function.

Return type:

bool

Notes

Adapted from https://scipy-cookbook.readthedocs.io/items/FittingData.html

Examples

>>> g = hs.model.components1D.PESVoigt()
>>> x = np.arange(-10, 10, 0.01)
>>> data = np.zeros((32, 32, 2000))
>>> data[:] = g.function(x).reshape((1, 1, 2000))
>>> s = hs.signals.Signal1D(data)
>>> s.axes_manager[-1].offset = -10
>>> s.axes_manager[-1].scale = 0.01
>>> g.estimate_parameters(s, -10, 10, False)
class hyperspy._components.pes_voigt.Voigt(legacy=True, **kwargs)

Bases: Component

Legacy Voigt profile component dedicated to photoemission spectroscopy data analysis that will renamed to PESVoigt in v2.0. To use the new Voigt lineshape component set legacy=False. See the documentation of Voigt for details on the usage of the new Voigt component and PESVoigt for the legacy component.

\[f(x) = G(x) \cdot L(x)\]

where \(G(x)\) is the Gaussian function and \(L(x)\) is the Lorentzian function. This component uses an approximate formula by David (see Notes).

Notes

Uses an approximate formula according to W.I.F. David, J. Appl. Cryst. (1986). 19, 63-64. doi:10.1107/S0021889886089999

hyperspy._components.pes_voigt.voigt(x, FWHM=1, gamma=1, center=0, scale=1)

Voigt lineshape.

The voigt peak is the convolution of a Lorentz peak with a Gaussian peak:

\[f(x) = G(x) \cdot L(x)\]

where \(G(x)\) is the Gaussian function and \(L(x)\) is the Lorentzian function. In this case using an approximate formula by David (see Notes). This approximation improves on the pseudo-Voigt function (linear combination instead of convolution of the distributions) and is, to a very good approximation, equivalent to a Voigt function:

\[\begin{split}z(x) &= \frac{x + i \gamma}{\sqrt{2} \sigma} \\ w(z) &= \frac{e^{-z^2} \text{erfc}(-i z)}{\sqrt{2 \pi} \sigma} \\ f(x) &= A \cdot \Re\left\{ w \left[ z(x - x_0) \right] \right\}\end{split}\]

Variable

Parameter

\(x_0\)

center

\(A\)

scale

\(\gamma\)

gamma

\(\sigma\)

sigma

Parameters:
  • gamma (real) – The half-width half-maximum of the Lorentzian.

  • FWHM (real) – The FWHM = \(2 \sigma \sqrt{(2 \log(2))}\) of the Gaussian.

  • center (real) – Location of the center of the peak.

  • scale (real) – Value at the highest point of the peak.

Notes

Ref: W.I.F. David, J. Appl. Cryst. (1986). 19, 63-64 doi:10.1107/S0021889886089999