[SciPy-dev] new function regrid for fitpack2

John Travers jtravs at gmail.com
Thu Oct 12 15:15:46 EDT 2006


I've added a patch to the ticket #286 that makes interp2d use regrid.
I think this must be the best compromise for now until we sort out a
suitable routine for scattered data interpolation.

Regards,
John

On 12/10/06, John Travers <jtravs at gmail.com> wrote:
> I started to look at this and think some extra work is required.
>
> The problem is that regrid requires the data to be evenly spaced on a
> rectangular grid, rather than just a rectangular grid (which could
> have, say, increasing spacing in the y direction). I think this may
> limit its use more than users of interp2d would expect.
>
> The problem then is:
>
> 1. The currently used function (dierckx surfit) is not suitable for
> interpolation and needs to be replaced (it segfaults my simple test).
>
> 2. regrid works very well (fast, low mem etc.) for regular rectangular
> grids, but can't handle varying rectangular grids, let alone scattered
> data.
>
> 3. uses probably expect that at least varying rectangular grids are handled
>
> Solutions:
>
> a) just use regrid and say we can't work with no regular data.
>
> b) use a regridding method to get regular data if required, then use regrid
>
> I favour the second. As it happens, this is what MATLAB does which I
> guess is a reasonable example to follow. The are several regridding
> methods. MATLAB uses the freely available (I think scipy compatible)
> Qhull code.
>
> So I'll have a look at packaging the qhull code into scipy, then we
> can move on from there.
>
> In the mean time, do we use regrid over the restricted domain, or use
> the current surfit (which only works in very few cases).
>
> Regards,
> John
>
>
> On 12/10/06, Stefan van der Walt <stefan at sun.ac.za> wrote:
> > On Thu, Oct 12, 2006 at 01:42:44PM +0100, John Travers wrote:
> > > Thanks! Sorry for the long lines, I'll be stricter on the format next
> > > time. I can send a patch for interp2d this evening (London time) if
> > > you want.
> >
> > That's great, I'll keep an eye out for it.  If anyone on the list
> > currently uses interp2d on irregularly gridded data, now is the time
> > to speak up.
> >
> > Cheers
> > Stéfan
> > _______________________________________________
> > Scipy-dev mailing list
> > Scipy-dev at scipy.org
> > http://projects.scipy.org/mailman/listinfo/scipy-dev
> >
>
>
> --
> My mobile (which I rarely answer): (+44) (0) 7739 105209
> If you want to see what I do: www.femto.ph.ic.ac.uk
>


-- 
My mobile (which I rarely answer): (+44) (0) 7739 105209
If you want to see what I do: www.femto.ph.ic.ac.uk



More information about the SciPy-Dev mailing list