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

Home » Public Forums » archive » smooth function with nan keyword but still getting "Floating illegal operand" messages
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
smooth function with nan keyword but still getting "Floating illegal operand" messages [message #64329] Sat, 20 December 2008 04:10
jkj is currently offline  jkj
Messages: 48
Registered: April 2007
Member
I have been using the SMOOTH function for a single vector containing
NaN values - and therefore I had the NaN keyword set - but have still
been getting "% Program caused arithmetic error: Floating illegal
operand" messages.

On switching to TS_SMOOTH, since it is a vector, the same data
produces none of the error messages, but the code takes _much_ longer
to run and the smoothed results are significantly different. There is
no NaN keyword for TS_SMOOTH but it obviously takes the NaN values
into consideration.

If I am using vector data with a fair amount (~20-30%) NaN values and
I use the SMOOTH function, then I'm just going to have to put up with
the "Floating illegal operand" messages? This is version 5.5 and I
get the same thing when running on 6.1, but maybe the error message is
not produced in version 7?

A sample vector is here: http://safaripass.com/mydata.save

I observe that for the "mydata" vector with a boxcar width of 5,
TS_SMOOTH loses most of the data above array index 517, which I do not
like. The boxcar behavior I would like is to discount NaN values
within the box and return an average of what is left-over - SMOOTH is
doing exactly this but TS_SMOOTH is requiring "boxcar" number of
consecutive non-NaN values before it assigns an average.

Why would SMOOTH have a NaN keyword and still produce error messages?
It looks like in order to get the best boxcar average of this quality
of data without the "Floating illegal operand" messages that I will
have to write an explicit boxcar average? any thoughts? Leaving a
trail of these messages does nothing to build the researcher's
confidence in the code! Apparently the SMOOTH function is internally
still executing a division even when no valid elements exist within
the boxcar.

Thanks,
-Kevin
[Message index]
 
Read Message
Previous Topic: Re: Workbench Graphics
Next Topic: Re: smooth function with nan keyword but still getting "Floating illegal operand" messages

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

Current Time: Fri Oct 10 01:43:02 PDT 2025

Total time taken to generate the page: 2.15935 seconds