From: jeremy theler <jeremy@talador.com.ar>
To: gsl-discuss@sourceware.org
Subject: Re: interp2d discussion
Date: Tue, 14 Jan 2014 01:51:00 -0000 [thread overview]
Message-ID: <1734301.PepIFFiX6L@tom> (raw)
In-Reply-To: <52D0A499.20000@colorado.edu>
On Friday 10 January 2014 18:55:37 Patrick Alken wrote:
> On 01/10/2014 05:27 PM, jeremy theler wrote:
> > Hi all,
> >
> > I consider the addition of these routines to GSL as a major breakthrough.
> >
> > Now I have three questions about generalization:
> > 1. can these 2D interpolation routines be extended to scattered (i.e.
> > non-
> >
> > rectangular) data?
>
> Not currently, but this can always be done with least-squares models.
> I'm not aware of any available software that interpolates on nonuniform
> grids - do you know of any?
I think I saw a python numerical library (whose name I forgot) that performed
some kind of scattered-data interpolation. I think it used a weigthed average
of first n neighbors. What I do in these cases is a nearest-neighbors search
using a k-dimensional tree to sort the data. Some simple 2D examples can be
seen in
http://www.talador.com.ar/jeremy/wasora/realbook/._realbook010.html
For two dimensional functions such as f(x,y) I once tried to do a 3-nearest
neighbors search, fit a plane as z = a*x + b*y + c an then evaluate the plane
z at the desired (x,y) location, but that approach had more problems than
advantages.
Actually, wasora is a piece of software I am writing that acts as a high-level
interface to GSL for most of its features (except multidim interpolation for
now, and ODE/DAE systems for which it uses SUNDIALS). Some examples of the GSL
manual are rewritten as wasora inputs in
http://www.talador.com.ar/jeremy/wasora/realbook/._realbook015.html
If someone wants to try, comments are welcome.
> > 2. can these 2D interpolation routines be extended to n dimensions?
>
> Once the 2D code is imported I'd like to make at least a 3D linear
> interpolater, which should be straightforward.
Good. Are n dimensions straightforward also?
--
jeremy
next prev parent reply other threads:[~2014-01-14 1:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <520EB115.9070606@ellipsix.net>
2014-01-03 19:00 ` [Help-gsl] Getting an extension listed on GSL page Patrick Alken
2014-01-05 20:31 ` David Zaslavsky
2014-01-06 16:58 ` interp2d discussion Patrick Alken
2014-01-10 6:05 ` David Zaslavsky
2014-01-10 6:11 ` David Zaslavsky
2014-01-10 16:37 ` Patrick Alken
2014-01-11 0:28 ` jeremy theler
2014-01-11 1:55 ` Patrick Alken
2014-01-14 1:51 ` jeremy theler [this message]
2014-01-14 2:23 ` Patrick Alken
2014-01-11 1:58 ` David Zaslavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1734301.PepIFFiX6L@tom \
--to=jeremy@talador.com.ar \
--cc=gsl-discuss@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).