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

Home » Public Forums » archive » Re: what is the best way to do a surface (or 2D) interpolation?
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: what is the best way to do a surface (or 2D) interpolation? [message #62711 is a reply to message #62710] Tue, 23 September 2008 09:54 Go to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
I think what you are looking for is krig2d. Look it up in help. The
only annoyance is that it is either looking for a regular grid (which
I think you have) or x,y,z triplets. I have never figured out how to
make x,y,z triplets other than using nested for loops to step through
the points.

From here read the krig2d help and work through the example there and
see if that solves your issue. If not let me know whats not working
and I'll see if I can help more.

One word of caution is that interpolation is great "inside" the range
where you have data, however "outside" the region is extrapolation and
is fraught with issues. I mean that your x's
IDL> print,vz
-1.62839 -1.23045 -0.628389 -0.327359 0.0483046
0.246672
and the new x's that you want
newx = [-2.0, -1.5, -1.0, -0.5, 0.0, 0.5]
some are outside and you need to be a little careful that the answer
actually makes sense as if often (maybe stronger than often) doesn't.





Cheers,

Brian

------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
http://people.bu.edu/balarsen/Home/IDL
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Getting array indices
Next Topic: giving input to fortran program using spawn in IDL

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

Current Time: Wed Oct 08 17:54:09 PDT 2025

Total time taken to generate the page: 0.00527 seconds