fitting.step

fitting.step(x, x0, y0, y1, a)

Sharp step function on a linear background.

Parameters:
  • x (array) – x-values.
  • x0 (float) – Center of step.
  • y0 (float) – Function value for x < x0.
  • y1 (float) – Function value for x > x0.
  • a (float) – Slope of baseline.
Returns:

f(x) = (y_1 - y_0) \mathrm{Heaviside}(x0 - x) + y_0 + a (x - x_0).