Voigt1D¶
-
class
astropy.modeling.functional_models.Voigt1D(x_0=0, amplitude_L=1, fwhm_L=0.6366197723675814, fwhm_G=0.69314718055994529, **kwargs)[source] [edit on github]¶ Bases:
astropy.modeling.Fittable1DModelOne dimensional model for the Voigt profile.
Parameters: x_0 : float
Position of the peak
amplitude_L : float
The Lorentzian amplitude
fwhm_L : float
The Lorentzian full width at half maximum
fwhm_G : float
The Gaussian full width at half maximum
Other Parameters: fixed : a dict
A dictionary
{parameter_name: boolean}of parameters to not be varied during fitting. True means the parameter is held fixed. Alternatively thefixedproperty of a parameter may be used.tied : dict
A dictionary
{parameter_name: callable}of parameters which are linked to some other parameter. The dictionary values are callables providing the linking relationship. Alternatively thetiedproperty of a parameter may be used.bounds : dict
eqcons : list
A list of functions of length
nsuch thateqcons[j](x0,*args) == 0.0in a successfully optimized problem.ineqcons : list
A list of functions of length
nsuch thatieqcons[j](x0,*args) >= 0.0is a successfully optimized problem.See also
Notes
Algorithm for the computation taken from McLean, A. B., Mitchell, C. E. J. & Swanston, D. M. Implementation of an efficient analytical approximation to the Voigt function for photoemission lineshape analysis. Journal of Electron Spectroscopy and Related Phenomena 69, 125-132 (1994)
Examples
import numpy as np from astropy.modeling.models import Voigt1D import matplotlib.pyplot as plt plt.figure() x = np.arange(0, 10, 0.01) v1 = Voigt1D(x_0=5, amplitude_L=10, fwhm_L=0.5, fwhm_G=0.9) plt.plot(x, v1(x)) plt.show()
Attributes Summary
amplitude_Lfwhm_Gfwhm_Linput_unitsparam_namesx_0Methods Summary
evaluate(x, x_0, amplitude_L, fwhm_L, fwhm_G)fit_deriv(x, x_0, amplitude_L, fwhm_L, fwhm_G)Attributes Documentation
-
amplitude_L¶
-
fwhm_G¶
-
fwhm_L¶
-
input_units¶
-
param_names= ('x_0', 'amplitude_L', 'fwhm_L', 'fwhm_G')¶
-
x_0¶
Methods Documentation
-
classmethod
evaluate(x, x_0, amplitude_L, fwhm_L, fwhm_G)[source] [edit on github]¶
-
classmethod
fit_deriv(x, x_0, amplitude_L, fwhm_L, fwhm_G)[source] [edit on github]¶
-