comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Interpolation of velocity Grid
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Interpolation of velocity Grid [message #56922] Tue, 20 November 2007 17:12
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article
<68af68f3-a832-42a1-b0e6-0b7278b2ba53@e25g2000prg.googlegroups.com>,
byrne.david@gmail.com wrote:

> Hi Guys,
>
> I have a quick question about an IDL problem i'm having and I can't
> seem to work out a clever way of achieving what I want to do. I was
> wondering if you had any ideas for me.
>
> My problem is that I need to interpolate an irregular velocity field
> grid to a regular one and for the life of me i can't work out how to
> do it.
>
> Ok for example I have two arrays, in one array I have all the global
> coordinates of the bases of my vectors and in the other all the global
> coordinates tips of my vectors with the origin reference at (0,0).
>
> So lets say base=(2, 30000) array and tip=(2,30000)
>
> Now I want to put these vectors onto a regular grid and lets say the
> maximum global coordinate is 3000.
>
> So I need to interpolate these vectors onto a (3000,3000) Grid with
> the velocities defined at each point. I guess some kind of
> interpolation to fill in flow field between the sampled data is needed
> but i'm not sure of how to achieve this.

There are many ways to approach this problem. The most straightforward
is probably to use the "base" and "tip" values to compute the x- and
y-components of the vectors. Then interpolate the two components
separately.

This can be done with TRIANGULATE and TRIGRID. An example of
interpolating an irregular grid to a regular grid can be found here

http://idl.tamu.edu/Book.html

(see the sample chapter), but you'll want to buy the whole book. :-)

Another possible approach is optimum interpolation, but that is considerably
more complicated.

Ken Bowman
Re: Interpolation of velocity Grid [message #56924 is a reply to message #56922] Tue, 20 November 2007 15:26 Go to previous message
ben.bighair is currently offline  ben.bighair
Messages: 221
Registered: April 2007
Senior Member
On Nov 20, 5:26 pm, byrne.da...@gmail.com wrote:
> Hi Guys,
>
> I have a quick question about an IDL problem i'm having and I can't
> seem to work out a clever way of achieving what I want to do. I was
> wondering if you had any ideas for me.
>
> My problem is that I need to interpolate an irregular velocity field
> grid to a regular one and for the life of me i can't work out how to
> do it.
>
> Ok for example I have two arrays, in one array I have all the global
> coordinates of the bases of my vectors and in the other all the global
> coordinates tips of my vectors with the origin reference at (0,0).
>
> So lets say base=(2, 30000) array and tip=(2,30000)
>
> Now I want to put these vectors onto a regular grid and lets say the
> maximum global coordinate is 3000.
>
> So I need to interpolate these vectors onto a (3000,3000) Grid with
> the velocities defined at each point. I guess some kind of
> interpolation to fill in flow field between the sampled data is needed
> but i'm not sure of how to achieve this.
>
> I guess the best way to visualise the problem is if you think of a
> swimming pool with some sort of flow. Now you sample the flow at
> irregular points with some kind of imaging technique. Now you need to
> regularise that grid of irregularly spaced vectors onto a regular grid
> the size of the image that you took. So it needs some kind of
> interpolation between data points.
>

Hi,

I am a little out of my area, but wouldn't you want to interpolate two
grids? The first for the magnitudes of the sample vectors and the
second one for the direction. IDL has lots of 2d interpolation
schemes and GRIDINPUT and GRID_DATA are probably the handiest. One
you have the two grids, you could use the PLOT_FIELD routine to take a
peek at the result.

Hope that helps.

Ben
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Interpolation of velocity Grid
Next Topic: PCOMP and TRIQL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:11:18 PDT 2025

Total time taken to generate the page: 0.00655 seconds