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

Home » Public Forums » archive » Interpolate the NaN in 2D array.
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: Interpolate the NaN in 2D array. [message #91511 is a reply to message #91508] Wed, 22 July 2015 12:11 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Wednesday, July 22, 2015 at 2:04:53 PM UTC-4, Paul van Delst wrote:
> On 07/22/15 13:14, a**@gmail.com wrote:
>> Hi everyone,
>>
>> I have a question about 2D interpolation with NaN inside. My doubt is
>> how I proceed to interpolate NaN inside the 2D array.
>
> Filter them out?
>
> INTERPOL has a /NAN keyword. But you can do it yourself too.

INTERPOL() is only for 1-d data I believe. But I would probably start by averaging the result of using INTERPOL() over a row, and INTERPOL() over a column. A more "correct' way would be to use the very powerful -- and very complicated -- GRIDDATA() function, but this is only for the ambitious.

For a similar problem I have used the maskinterp package by Joe Harrington ( https://physics.ucf.edu/~jh/ast/software.html ) but again it is not very user-friendly. However, in my case I had to make sure that I did not bias my results when interpolating over multiple NaN values, and this package is good for this.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: compass search
Next Topic: !x/y.window & convert_coord giving unwanted offset to my image scale

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

Current Time: Wed Oct 08 20:09:02 PDT 2025

Total time taken to generate the page: 0.01380 seconds