interpolate with missing values [message #76915] |
Fri, 15 July 2011 12:08  |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
Hi IDLers,
I would like to have a 2D interpolation routine to do the same as
INTERPOLATE but taking in account missing values.
What I am doing right now is setting the missing values to !NAN and
then I use INTERPOLATE. When the routine wants to interpolate a point
surrounded by 4 points, it uses bilinear interpolation and if one of
them is !NAN then it returns !NAN.
In this same example (1 point = !NAN) I would like to compute the
interpolation using some kind of triangulation using the 3 finite and
valid points.
I don't really know if this way to proceed is correct and what I
should do to interpolate, for example, a point surrounded by 2 missing
values and 2 valid points.
Does all of this make sense to you ? Did you ever try to do something
similar ?
Suggestions, examples or comments are really appreciated. Thank you in
advance,
nata
|
|
|
Re: interpolate with missing values [message #77000 is a reply to message #76915] |
Mon, 18 July 2011 15:40  |
Marcos van Dam
Messages: 1 Registered: July 2011
|
Junior Member |
|
|
On Jul 16, 7:08 am, Yun <bernat.puigdomen...@gmail.com> wrote:
> Hi IDLers,
>
> I would like to have a 2D interpolation routine to do the same as
> INTERPOLATE but taking in account missing values.
> What I am doing right now is setting the missing values to !NAN and
> then I use INTERPOLATE. When the routine wants to interpolate a point
> surrounded by 4 points, it uses bilinear interpolation and if one of
> them is !NAN then it returns !NAN.
>
> In this same example (1 point = !NAN) I would like to compute the
> interpolation using some kind of triangulation using the 3 finite and
> valid points.
> I don't really know if this way to proceed is correct and what I
> should do to interpolate, for example, a point surrounded by 2 missing
> values and 2 valid points.
>
> Does all of this make sense to you ? Did you ever try to do something
> similar ?
>
> Suggestions, examples or comments are really appreciated. Thank you in
> advance,
> nata
You can use krig2d to interpolate irregularly sampled data.
|
|
|