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

Home » Public Forums » archive » Re: moving average of a large array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: moving average of a large array [message #51487 is a reply to message #51485] Fri, 24 November 2006 06:46 Go to previous messageGo to previous message
envi35@yahoo.ca is currently offline  envi35@yahoo.ca
Messages: 48
Registered: March 2005
Member
Hi, thanks for you reply. I must have been blinded not seeing SMOOTH
can be used instead of TS_SMOOTH for multi-dimension array!!

Jenny

Kenneth P. Bowman wrote:
> In article <1164296828.559622.31580@m7g2000cwm.googlegroups.com>,
> "Jenny" <envi35@yahoo.ca> wrote:
>
>> Hi, I want to calculate the moving average of a large array:
>> data[800,800,365]. The moving average is for the 3rd dimension - day of
>> year. But TS_SMOOTH only works for a vector. Anyone knows if there is
>> another function in IDL that I could use? I probably can use TS_SMOOTH
>> and for loops to get this, but it will be slow. In addition, there are
>> invalid data in my array as well.
>>
>> I've read discussions in this list about adding Dimension and NAN
>> keywords to other functions, such as Total, Median, etc., which are
>> very useful. Why nobody cares about TS_SMOOTH? Or am I asking a silly
>> question? Is there an obvious way to calculate the moving average of a
>> large array?
>>
>>
>> Thanks,
>> Jenny
>
> If x = FLTARR(800, 800, 365)
>
> try
>
> y = SMOOTH(x, [1, 1, 3])
>
> This runs a boxcar smoother, which has awful spectral characteristics.
> You also might want to consider what to do at the edges.
>
> Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: ENVI - Output to external format - seem to be losing georeferencing
Next Topic: IDLy approach to splatting points on a grid?

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

Current Time: Thu Oct 09 22:10:26 PDT 2025

Total time taken to generate the page: 1.11638 seconds