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
-
spin_orbit_splitting
¶ - Type
Bool
-
estimate_parameters
(signal, E1, E2, only_current=False)¶ Estimate the voigt function by calculating the momenta the gaussian.
- Parameters
- Returns
- Return type
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.
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