hyperspy._components.voigt module

class hyperspy._components.voigt.Voigt

Bases: hyperspy.component.Component

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)*L(x) where G(x) is the Gaussian function and L(x) is the Lorentzian function

area
Type

Parameter

centre
Type

Parameter

FWHM
Type

Parameter

gamma
Type

Parameter

resolution
Type

Parameter

shirley_background
Type

Parameter

non_isochromaticity
Type

Parameter

transmission_function
Type

Parameter

spin_orbit_splitting
Type

Bool

spin_orbit_branching_ratio
Type

float

spin_orbit_splitting_energy
Type

float

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

Estimate the voigt function by calculating the momenta 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

Return type

bool

Notes

Adapted from http://www.scipy.org/Cookbook/FittingData

Examples

>>> g = hs.model.components1D.Gaussian()
>>> 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' : data})
>>> s.axes_manager.axes[-1].offset = -10
>>> s.axes_manager.axes[-1].scale = 0.01
>>> g.estimate_parameters(s, -10,10, False)
function(x)
hyperspy._components.voigt.sqrt2pi = 2.5066282746310002
hyperspy._components.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.

The formula used to calculate this is:

z(x) = (x + 1j gamma) / (sqrt(2) sigma)
w(z) = exp(-z**2) erfc(-1j z) / (sqrt(2 pi) sigma)

V(x) = scale Re(w(z(x-center)))
Parameters
  • gamma (real) – The half-width half-maximum of the Lorentzian

  • FWHM (real) – The FWHM 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

adjusted to use stddev and HWHM rather than FWHM parameters