From a set of data points, I wish to generate a single cubic spline function, that best fits the points.
That is, seeking to obtain a single 3rd order polynomial function, that best-fits the data - as opposed to a piecewise polynomial. (the end-goal is to then find the maxima of the second derivative of this function)
I have tried scipy.interpolate.CubicSpline, but it seems to only allow generation of a piecewise cubic spline.
Is there another function, or another library, that will generate a single cubic spline best-fitting given data points?
Background: The data points are from a load cell (weight sensor) that represents two physical bodies coming into contact with each other. Intention is to fit a cubic spine for data smoothing, then calculate the maxima of the second derivative - in order to find the exact moment they come into contact - as best possible with the given sensor. (If there are any flaws observed in this methodology, observations welcomed)
Raw Data:
Piecewise cubic spline generated from scipi
Desired result should yield a curve something like this: