fitting.smoothstep

fitting.smoothstep(x, x0, y0, y1, a, k)

Smooth 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.
  • k (float) – Sharpness of step (k << 1 / x0: smooth, k >> 1 / x0: sharp).
Returns:

f(x) = \frac{y_1 - y_0}{1 + e^{-2 k (x_0 - x)}} + y_0 + a (x - x_0).