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

Home » Public Forums » archive » Interpolation routines
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Interpolation routines [message #92650] Mon, 01 February 2016 16:47 Go to previous message
laura.hike is currently offline  laura.hike
Messages: 87
Registered: September 2013
Member
I was wondering whether anyone could recommend an IDL routine (or extra keywords) that would allow me to interpolate my data correctly. Here are the constraints:

- input data and output data are on irregular 1D grids
- NaN is used as the indicator or bad or missing values
- the input abcissa values always span a broader range than the output values, HOWEVER, sometimes not all of the input locations have ordinate values associated with them. This generally occurs at the top or bottom of the column. In other words, a number of the levels at the top or bottom may be filled with NaNs.

What I'm looking for is a higher order (not linear) interpolation routine that deals gracefully with NaNs and won't interpolate beyond the range of known values.

I tried interpol with /spline. If I use the /NaN option, the program seems to run fine but fails when there are fewer than 4 good values in a row. If I take out the /NaN, it does not fail in this case. However, it turns out that it interpolates beyond where there are any valid input values (i.e., out into the NaN area). If I replace the NaNs with zeros, it does the same thing (which surprised me).

I tried the spline command instead. It failed when I substituted 0s for the NaNs and returned all NaNs when I left them in.

Rather than continuing to try all of IDL's interpolation routines with all their options, I was hoping someone would be able to answer this question off the top of their head.

Thanks,

Laura
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: fitting histogram distribution with double gaussian
Next Topic: 4D Interpolation

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

Current Time: Wed Oct 08 15:56:49 PDT 2025

Total time taken to generate the page: 0.00427 seconds