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

Home » Public Forums » archive » Interpolation problem
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 problem [message #36913 is a reply to message #36824] Mon, 03 November 2003 12:06 Go to previous message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
sdj@tiscali.it (Pepe) wrote in message news:<56bc95a7.0311030321.42de483d@posting.google.com>...
>
> I have a 2-d array on a regular grid with valid values which are all
> +ve. Non valid values are set to -9999 and some 'intermediate' values
> I would like to interpolate are set to -1.

It sounds like you may be mis-understanding the MISSING keyword in
interpolate. In fact, you may want to be using different functions
altogther: TRIANGULATE & TRIGRID.

Try the program below and see if it's what you're looking for.

Ciao.

;--------------------------------------------------
PRO test

; Make a data set
n = 100
data = SIN( FINDGEN(n,n)/n^2 )

; Missing data
mx = RANDOMU(1,n,/LONG) MOD n^2
data[mx] = -1
valid = WHERE(data NE -1)
ix = valid MOD n
iy = valid / n

; Fill in missing data
TRIANGULATE,ix,iy,tr
new = TRIGRID(ix,iy,data[valid],tr,NX=n,NY=n)

; Display.
tvscl,data >0
tvscl,new

END
;------------------------------------------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Keywords/Parameters and Common Blocks
Next Topic: Keywords/Parameters and Common Blocks

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

Current Time: Wed Oct 08 16:58:21 PDT 2025

Total time taken to generate the page: 0.00439 seconds