hyperspy._components.polynomial_deprecated module
- class hyperspy._components.polynomial_deprecated.Polynomial(order=2, legacy=True, module='numexpr', **kwargs)
Bases:
Component
n-order polynomial component. (DEPRECATED)
Polynomial component defined by the coefficients parameters which is an array of len the order of the polynomial. For example, the [1,2,3] coefficients define the following 3rd order polynomial: f(x) = 1x² + 2x + 3 Polynomial will be replaced by Polynomial2
This API is deprecated and will be replaced by
Polynomial
in HyperSpy v2.0. To use the new API, set legacy to False.- Parameters:
order (int) – Order of the polynomial.
legacy (bool, default True) – If False, use the new API.
module (str) – See the docstring of
Polynomial
for details.
- coeffcients
- Type:
array
- estimate_parameters(signal, x1, x2, only_current=False)
Estimate the parameters by the two area method
- Parameters:
- Return type:
- function_nd(axis)
Returns a numpy array containing the value of the component for all indices. If enough memory is available, this is useful to quickly to obtain the fitted component without iterating over the navigation axes.
- grad_one_coefficient(x, index)
Returns the gradient of one coefficient