hyperspy._components.polynomial module

class hyperspy._components.polynomial.Polynomial(order=2)

Bases: hyperspy.component.Component

n-order polynomial component.

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

coeffcients

array

estimate_parameters(signal, x1, x2, only_current=False)

Estimate the parameters by the two area method

Parameters:
  • signal (Signal1D instance) –
  • x1 (float) – Defines the left limit of the spectral range to use for the estimation.
  • x2 (float) – Defines the right limit of the spectral range to use for the estimation.
  • only_current (bool) – If False estimates the parameters for the full dataset.
Returns:

Return type:

bool

function(x)
get_polynomial_order()
grad_coefficients(x)
grad_one_coefficient(x, index)

Returns the gradient of one coefficient