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

Home » Public Forums » archive » ts_smooth and nan
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
ts_smooth and nan [message #93843] Thu, 03 November 2016 11:32 Go to next message
nili is currently offline  nili
Messages: 1
Registered: November 2016
Junior Member
Hi
I'm a begginer in IDL. My data is a vector with 907 elements and I'm using TS_SMOOTH to get moving average.
TS_SMOOTH doesn't have /NAN keyword so for each box which contains NAN it gives me mean = NAN.
What can I do with this function to get moving average without considering NAN?
Re: ts_smooth and nan [message #93844 is a reply to message #93843] Thu, 03 November 2016 13:05 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
Are you sure want to use TS_SMOOTH() rather than the much more commonly used SMOOTH() function? Actually, if you are using a central moving average (the default) in TS_SMOOTH(), then it gives the same results as SMOOTH() away from the end points. And SMOOTH() does have a /NAN keyword.

If you really do have a time series with NaN values, and want to compute an autoregressive model, then you could edit the code to ts_smooth.pro. But it is not to clear how one would want to handle NaN values in that case.

--Wayne



On Thursday, November 3, 2016 at 2:32:44 PM UTC-4, nili wrote:
> Hi
> I'm a begginer in IDL. My data is a vector with 907 elements and I'm using TS_SMOOTH to get moving average.
> TS_SMOOTH doesn't have /NAN keyword so for each box which contains NAN it gives me mean = NAN.
> What can I do with this function to get moving average without considering NAN?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Plotting Graphics-IDL beginner
Next Topic: widget_table disjoint selection issues

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

Current Time: Wed Oct 08 11:34:05 PDT 2025

Total time taken to generate the page: 0.00409 seconds