[SciPy-User] Problems with 2D interpolation of data on polar grid

Pauli Virtanen pav@iki...
Sat Aug 21 13:44:44 CDT 2010

Fri, 20 Aug 2010 11:52:49 -0400, Kyle Parfrey wrote:
> I've been having some trouble doing 2D interpolation with both interp2d
> and bisplrep/bisplev. My data is on a spherical polar (r, theta) grid,
> and I'm trying to interpolate functions similar to the vector components
> of a dipole field. The output looks very wrong, and I keep getting
> warnings like (from interp2d):

Consider using RectBivariateSpline, if your data indeed is on a regular 
grid. This way FITPACK might choose better knots...

If your data, furthermore, is given on a homogeneous grid, another 
alternative is scipy.ndimage.map_coordinates. Using that requires some 
thinking, though.

Pauli Virtanen

More information about the SciPy-User mailing list