hyperspy._components.heaviside module

class hyperspy._components.heaviside.HeavisideStep(A=1.0, n=0.0, module='numpy', compute_gradients=True, **kwargs)

Bases: Expression

The Heaviside step function.

Based on the corresponding numpy function using the half maximum definition for the central point:

\[\begin{split}f(x) = \begin{cases} 0 & x<n\\ A/2 & x=n\\ A & x>n \end{cases}\end{split}\]

Variable

Parameter

\(n\)

centre

\(A\)

height

Parameters:
  • n (float) – Location parameter defining the x position of the step.

  • A (float) – Height parameter for x>n.

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