rb_decay

rb_decay(x, y, b=0.5)[source]

Get base of exponential decay function which is assumed to be close to 1.

This assumes following model:

y(x)=aαx+b.

To estimate the base of decay function α, we consider

y(x)=y(x)b=aαx,

and thus,

y(x+dx)=aαxαdx.

By considering the ratio of y values at x+dx to x,

ry=aαxαdxaαx=αdx.

From this relationship, we can estimate α as

α=ry1dx.
Parameters:
  • x (ndarray) – Array of x values.

  • y (ndarray) – Array of y values.

  • b (float) – Asymptote of decay function.

Returns:

Base of decay function.

Return type:

float