Drude1D¶
-
class
astropy.modeling.physical_models.
Drude1D
(amplitude=1.0, x_0=1.0, fwhm=1.0, **kwargs)[source]¶ Bases:
astropy.modeling.Fittable1DModel
Drude model based one the behavior of electons in materials (esp. metals).
Parameters: amplitude : float
Peak value
x_0 : float
Position of the peak
fwhm : float
Full width at half maximum
Model formula:
\[f(x) = A \frac{(fwhm/x_0)^2}{((x/x_0 - x_0/x)^2 + (fwhm/x_0)^2}\]Examples
import numpy as np import matplotlib.pyplot as plt from astropy.modeling.models import Drude1D fig, ax = plt.subplots() # generate the curves and plot them x = np.arange(7.5 , 12.5 , 0.1) dmodel = Drude1D(amplitude=1.0, fwhm=1.0, x_0=10.0) ax.plot(x, dmodel(x)) ax.set_xlabel('x') ax.set_ylabel('F(x)') plt.show()
Attributes Summary
amplitude
fwhm
input_units
This property is used to indicate what units or sets of units the evaluate method expects, and returns a dictionary mapping inputs to units (or None
if any units are accepted).param_names
return_units
This property is used to indicate what units or sets of units the output of evaluate should be in, and returns a dictionary mapping outputs to units (or None
if any units are accepted).x_0
Methods Summary
evaluate
(x, amplitude, x_0, fwhm)One dimensional Drude model function fit_deriv
(x, amplitude, x_0, fwhm)Drude1D model function derivatives. Attributes Documentation
-
amplitude
= Parameter('amplitude', value=1.0)¶
-
fwhm
= Parameter('fwhm', value=1.0)¶
-
input_units
¶ This property is used to indicate what units or sets of units the evaluate method expects, and returns a dictionary mapping inputs to units (or
None
if any units are accepted).Model sub-classes can also use function annotations in evaluate to indicate valid input units, in which case this property should not be overridden since it will return the input units based on the annotations.
-
param_names
= ('amplitude', 'x_0', 'fwhm')¶
-
return_units
¶ This property is used to indicate what units or sets of units the output of evaluate should be in, and returns a dictionary mapping outputs to units (or
None
if any units are accepted).Model sub-classes can also use function annotations in evaluate to indicate valid output units, in which case this property should not be overridden since it will return the return units based on the annotations.
-
x_0
= Parameter('x_0', value=1.0)¶
Methods Documentation
-