components2D
#
Components that can be used to define a 2D model for e.g. curve fitting.
Writing a new template is easy, see the user guide documentation on creating components.
For more details see each component docstring.#
Expression
Create a component from a string expression.
Gaussian2D
Normalized 2D elliptical Gaussian function component.
- class hyperspy.api.model.components2D.Gaussian2D(A=1.0, sigma_x=1.0, sigma_y=1.0, centre_x=0.0, centre_y=0, module=None, **kwargs)#
Bases:
Expression
Normalized 2D elliptical Gaussian function component.
\[f(x,y) = \frac{A}{2\pi s_x s_y}\exp\left[-\frac{\left(x-x_0\right) ^{2}}{2s_{x}^{2}}\frac{\left(y-y_0\right)^{2}}{2s_{y}^{2}}\right]\]Variable
Parameter
\(A\)
A
\(s_x,s_y\)
sigma_x/y
\(x_0,y_0\)
centre_x/y
- Parameters:
- A
float
Volume (height of the peak scaled by \(2 \pi s_x s_y\)) – eqivalent to the area in a 1D Gaussian.
- sigma_x
float
Width (scale parameter) of the Gaussian distribution in x direction.
- sigma_y
float
Width (scale parameter) of the Gaussian distribution in y direction.
- centre_x
float
Location of the Gaussian maximum (peak position) in x direction.
- centre_x
float
Location of the Gaussian maximum (peak position) in y direction.
- add_rotationbool
If True, add the parameter rotation_angle corresponding to the angle between the x and the horizontal axis.
- **kwargs
Extra keyword arguments are passed to the
Expression
component.
- A
- Attributes:
- fwhm_x, fwhm_y
float
Convenience attributes to get and set the full width at half maximum along the two axes.
- fwhm_x, fwhm_y