hyperspy._components.eels_double_power_law module

class hyperspy._components.eels_double_power_law.DoublePowerLaw(A=1e-05, r=3.0, origin=0.0, shift=20.0, ratio=1.0, left_cutoff=0.0, module='numexpr', compute_gradients=False, **kwargs)

Bases: Expression

Double power law component for EELS spectra.

\[f(x) = A \cdot [s_r \cdot (x - x_0 - x_s)^{-r} + (x - x_0)^{-r}]\]

Variable

Parameter

\(A\)

A

\(r\)

r

\(x_0\)

origin

\(x_s\)

shift

\(s_r\)

ratio

Parameters:
  • A (float) – Height parameter.

  • r (float) – Power law coefficient.

  • origin (float) – Location parameter.

  • shift (float) – Offset of second power law.

  • ratio (float) – Height ratio of the two power law components.

  • **kwargs – Extra keyword arguments are passed to the Expression component.

left_cutoff

For x <= left_cutoff, the function returns 0. Default value is 0.0.

Type:

float

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.