Sky is falling, maybe? [message #68233] |
Thu, 08 October 2009 11:40 |
Lasse Clausen
Messages: 22 Registered: August 2001
|
Junior Member |
|
|
I find the following odd but maybe the sky is just falling and one of
you guys can explain why this happens. Try running
power = randomu(1001, 150)
power[77+lindgen(10)*3] = 1e+7
help, where(~finite(power))
plot, power, yrange=[.1, 10]
loadct, 12
oplot, smooth(power, 12, /nan), thick=3, color=20
oplot, smooth(power, 12), thick=3, color=120
end
On my machine
IDL> print, !version
{ x86_64 linux unix linux 7.0 Oct 25 2007 64 64}
I see a distinct difference in the SMOOTH output after the very uppy-
downy bit of the data. It seems the documentation should be changed
from
SMOOTH should never be called without the NAN keyword if the input
array may possibly contain NaN values.
to
SMOOTH should never be called without the NAN. Period.
Again, maybe I'm missing something but the SMOOTH function seems like
a pretty straight forward piece of code - without ever having seen it,
of course - that leaves very little room for error. But by the same
token we all know that "Every program has at least one bug and can be
shortened by at least one instruction - from which, by induction - it
can be shown that every program can be reduced to one instruction that
doesn't work".
So long
Lasse
|
|
|