pyvib.interpolate module

pyvib.interpolate.piecewise_linear(x, y, s, delta=None, xv=[])[source]

Interpolate piecewise segments.

Parameters:
  • x (ndarray) – x-coordinate for knots
  • y (ndarray) – y-coordinate for knots
  • s (ndarray. [len(x)+1]) – Slopes for line segments. Len: ‘number of knots’ + 1
  • delta (ndarray) – Regularization interval, ie. enforce continuity of the derivative
  • xv (ndarray) – x-coordinates for points to be interpolated
Returns:

yv – Interpolated values

Return type:

ndarray

pyvib.interpolate.piecewise_linear_der(x, y, s, delta=None, xv=[])[source]
pyvib.interpolate.spline(x, a, xv)[source]
Parameters:
  • x (ndarray) – Spline knot (x)-coordinate
  • a (ndarray [(len(x),4)]) – Coefficients for each cubic spline
  • xv (float) – Current point
Returns:

  • yv (float) – Ordinate(y) for point xv
  • yvp (float) – Derivative of y for point xv