tmdsimpy.postprocess.continuation.hermite_upsample

tmdsimpy.postprocess.continuation.hermite_upsample(XlamP_full, XlamP_grad_full, upsample_freq=10, new_lams=None)

Use cubic hermite splines to interpolate to more points.

Parameters:
XlamP_full(M, N) numpy.ndarray

Solution points calculated with continuation. First dimension corresponds to M individual solutions. Second dimension corresponds to degrees of freedom at each solution point (N). The last column corresponds to the continuation control parameter lam and must be monotonically increasing for this function.

XlamP_grad_full(M, N) numpy.ndarray

Gradients (prediction directions) at each of the continuation steps. The last column corresponds to the continuation control parameter lam and must be strictly greater than 0 for this function.

upsample_freqint, optional

Factor of how many points should be included between each step. For the default of 10, 9 points are added between each step resulting in 10 times the number of output points. This argument is ignored if new_points is not None The default is 10.

new_lams1D numpy.ndarray or None, optional

Array of new values of lam to interpolate to. If None, then the upsample_freq is used instead. The default is None.

Returns:
XlamP_interp(Minterp, N) numpy.ndarray

Solutions at interpolated points where Minterp=(M-1)*upsample_freq+1 or Minterp=new_points.shape[0].

See also

hermite_interp

Cubic Hermite Spline interpolation function with similar format.

linear_interp

Linear interpolation function with similar format.

Notes

The use of cubic spline interpolation may result in artificial effects if the interpolated function is not smooth and well behaved.