hyperspy._components.offset module

class hyperspy._components.offset.Offset(offset=0.0)

Bases: Component

Component to add a constant value in the y-axis.

\[f(x) = k\]

Variable

Parameter

\(k\)

offset

Parameters:

offset (float) –

property _constant_term

Get value of constant term of component

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

Estimate the parameters by the two area method

Parameters:
  • signal (BaseSignal 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.

Return type:

bool

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.