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

Home » Public Forums » archive » Interpolation question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: interpolation question [message #48486 is a reply to message #48393] Thu, 20 April 2006 12:26 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
chen123.dian@gmail.com wrote:
> Thanks, Peter,
>
> Your code works well for 1-D data. It will be nice to extend it to 2-D
> data.

The key to solving your problem is locating the points of your output
grid in the "index space" of your input grid. There are routines to do
this in the Motley library:

http://www.dfanning.com/hadfield/idl/README.html

They are called MGH_LOCATE and MGH_LOCATE2, for 1D and 2D respectively.
(The 1D version uses the INTERPOL trick suggested by Peter.) Their use
was discussed on the group recently in a couple of threads entitled
"Interpolating a regular grid" and "matching 2 grids". See

http://tinyurl.com/r9t5s
http://tinyurl.com/fherp

--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Length of command line input
Next Topic: ellipsoid 3D

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

Current Time: Fri Oct 10 00:17:36 PDT 2025

Total time taken to generate the page: 0.56178 seconds