dani_bandita
dani_bandita

Reputation: 93

How to define a higher-degree spline using python?

I am using the Scipy CubicSpline interpolation based on a certain number of points as shown in the diagram below:Scipy Cubic Spline

My problem is, the second derivative of the Cubic Splive function looks a little bit edgy:

Second derivative

In order to smooth the second curve I need a higher degree of spline interpolation. Is there a Scipy build in function (similar to CubicSpline) or an easy way to do that? (A b-spline function want work)

Upvotes: 1

Views: 617

Answers (1)

ev-br
ev-br

Reputation: 26030

make_interp_spline should be able to construct BSpline objects of higher degrees (FITPACK only goes up to k=5, which is hardcoded fairly deep down).

Upvotes: 1

Related Questions