step_function

sisl.physics.step_function(x, x0=0.0)

Step function, also known as \(1 - H(x)\)

This function equals one minus the Heaviside step function

\begin{align} S(x,x_0) = \left\{\begin{aligned}1&\quad \text{for }x < x_0 \\ 0.5&\quad \text{for }x = x_0 \\ 0&\quad \text{for }x>x_0 \end{aligned}\right. \end{align}
Parameters:
  • x (array_like) – points at which the step distribution is calculated

  • x0 (array_like, optional) – step position

Returns:

numpy.ndarray – the step function distribution, same length as x