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

Home » Public Forums » archive » Re: Seasonal Variation in Trend Analysis
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: Seasonal Variation in Trend Analysis [message #56070 is a reply to message #56069] Thu, 27 September 2007 10:26 Go to previous messageGo to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
"David Fanning" <news@dfanning.com> wrote in message
news:MPG.21655a1d1487d44b98a09d@news.frii.com...
> Ingo von Borstel writes:
>
>> I'd do a Fourier transform, filter out the terms that correspond to the
>> seasonal frequency/ies and possibly do a back-transform.
>
> Well, I can see this is what I *want* to do, but I
> am still having some trouble with the *how* to do. :-)
>
> For example, how, exactly, would I construct such
> a filter. To knock out the first harmonic, would
> I construct a circular filter near the origin? How
> near?

As a quick answer, FFT the data (assuming regular sampling etc)
and find the frequency corresponding to the seasonal signal.
(frequencies are i/NT where T is the sampling interval - for instance
one measurement each day).

Multiply your spectrum with zero at that point (and 1 every other point)
(also do that for the negative frequency component - assuming real data).
Invert the FFT.

You have removed the precise seasonal frequency.

You can perhaps improve that by multiplying the adjacent frequencies
by 0.5 above (i.e. your mask is 1,1,1,1,1,1....1,1 ,0.5,0,0.5,1,1.....)

That is equivalent to applying a hanning window filter to remove the
seasonal signal.

Sorry for brief description, I am taking care of a 2.5 yr old with the flu
right now so I have to be quick.

Cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to comment out large section of codes in IDL?
Next Topic: Unsolved indexing problem 2 weeks ago.

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

Current Time: Fri Oct 10 15:21:18 PDT 2025

Total time taken to generate the page: 0.72483 seconds