[SciPy-User] Problems with 2D interpolation of data on polar grid
Kyle Parfrey
kyle@astro.columbia....
Mon Aug 30 11:11:31 CDT 2010
Thanks everyone for all your replies, especially to Denis for those
detailed notes on stackoverflow.
I've managed to get it to work well with
interpolate.RectBivariateSpline (as suggested above) on a rectangular
(r, theta) grid, with quintic splines in theta and cubic in r, and no
smoothing (s=0). I don't know why that particular combination works so
well (quintic in both directions requires some smoothing, and the
amount needed depends on the dataset, not just the grid, which is
really bad for what I'm trying to do), I think I was being careful
enough to always convert to Cartesian coordinates (both X, Y and Xnew,
Ynew) etc, but the routines just seem to do a much better job on
rectangular grids.
If I run into problems with this later I'll try griddata() as described.
Thanks again,
Kyle
On 30 August 2010 10:48, denis <denis-bz-gg@t-online.de> wrote:
> Kyle,
> it looks as though there's a mixup here between Cartesion X,Y and
> polar Xnew,Ynew.
> griddata() will catch this to some extent with masked array Znew
> but the the Fitpack routines will extrapolate *without warning*.
> See the too-long notes under
> http://stackoverflow.com/questions/3526514/problem-with-2d-interpolation-in-scipy-non-rectangular-grid
>
> cheers
> -- denis
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
More information about the SciPy-User
mailing list