[SciPy-Dev] Akima Interpolation

Pauli Virtanen pav@iki...
Tue Sep 10 09:00:33 CDT 2013


Andreas Hilboll <lists <at> hilboll.de> writes:
[clip]
> I agree it would be nice to store the spline in the same tck format as
> used by FITPACK. Unfortunately, all references I could find directly
> compute the polynomial coefficients of the interpolants, and I couldn't
> find a refernce about how to derive the B-spline coefficients, i.e., the
> c, from the polynomial coefficients. I checked the bspline work by
> Chuck, but there isn't any B-spline coeffient calculation from the pp
> representation (yet?). Any ideas where to look?

In that case, you can format the data in piecewise polynomial form,
in terms of coefficients and breakpoints.

There's a class named `ppform` in `scipy.interpolate`, and you probably
can return an instance of that. I think there is a generic algorithm for
converting from that format to B-splines, but the pp representation will
also work fine as-is.

Unfortunately, the current ppform implementation is crappy (quadratic
memory and time requirement in evaluation . . .), and should be rewritten
e.g. in Cython. During the scipy sprint @ euroscipy there was
discussion about fixing the situation (i.e. make the ppform
implementation sane, and deprecate polyint.PiecewisePolynomial, which
seems inefficient), but this was not yet done. I think Evgeni Burovski
was interested in tackling this, so if you want to also attack the
problem, you can coordinate.

-- 
Pauli Virtanen



More information about the SciPy-Dev mailing list