[SciPy-user] Can't get interpolate.bisplrep() to work

Grant Edwards grante at visi.com
Wed Dec 22 11:43:22 CST 2004


I just can't figure out how to get the spline surface fitting
routine interpolate.bisplrep to work.  Specifically, it only
seems to work for very particular grid sizes, and gives useless
results for most others.

In the tutorial, a 20x20 grid is used, but there is no
explination how 20x20 is chosen.  Most of the other grid sizes
I've tried dont' work (e.g 15x15, 16x16, 20x25, 25x20, 25x25).

I bought a copy of Dierckx's book, but it contains no practical
information on the usage of the FITPACK library. Nor does the
web site for FITPACK [http://www.netlib.org/dierckx/index.html]
contain any usage information. AFAICT, the FITPACK library
(upon which the interpolate module is based) spline surface
fitting routine is useless for real-world problems and only
suitable for tutorial purposes.

Of the 11 grids tried, only 4 produced reasonable results:
13x13, 17x17, 17x19, 20x20.

If the goal were to pick a grid by hand to produce a nice
graph, it wouldn't be an issue, but I need to be able to fit a
surface to a set of points in an automated manner without
requiring a human to adjust the grid sizes to get reasonable
surface fit.  In my application the grid points represent
physical data points and it won't be possible to "add more
points" to make the library happy, and discarding points is
throwing away valuable data.

Here's a web page with surface plots for various grid sizes:

 http://www.visi.com/~grante/scipy/interpolate.html
 
-- 
Grant Edwards
grante at visi.com



More information about the SciPy-user mailing list