Re:[ncl-talk] 1D fft and spectra

From: <xiexin163_at_nyahnyahspammersnyahnyah>
Date: Tue, 29 May 2007 21:25:14 +0800

Hi, Dennis

Your explaination is very useful!
Now I know their difference.
Thanks a lot!

Xie Xin

In your mail:
>From: Dennis Shea <shea_at_ucar.edu>
>Reply-To:
>To: xiexin163_at_zju.edu.cn
>Subject: Re:[ncl-talk] 1D fft and spectra
>Date:Mon, 28 May 2007 06:31:23 -0600 (MDT)
>
>I neglected to post the sample plots. See:
>
> http://www.cgd.ucar.edu/~shea/1DfftExmpl.png
>
> Also, for the record, the units returned by specx_anal:
>
> (units_of_variable)^2 / frequency_interval
>
> ---
>
> On Sun, 27 May 2007, Dennis Shea wrote:
>
> > I responded to Verica. Perhaps I did not post to ncl-talk.
> >
> > I have attached a script. It clearly demonstrates that
> >
> > [1] The shape of the periodograms calculated via ezfftf and
> > specx_anal are the same. If you want the ezfftf periodogram
> > estimates to have the same scale, multiply the
> > values by (N/2).
> > ;spcfft = spcfft*(nw/2) ; normalize
> >
> > [2] The scales are different. As noted in the documentation,
> > the specx_anal periodogram has been normalized so that
> > the area under the curve is the same as the population
> > variance of the input data.
> >
> > [3] The attached script explicitly calculates the area.
> > The variance matches the input series.
> >
> >
> > Cheers!
> >
> >
> >
> >
> > On Mon, 28 May 2007, xiexin163_at_zju.edu.cn wrote:
> >
> > >
> > > Hi,
> > >
> > > I have the same problem as Verica has when I use these two functions
> > > to calculate some power spectra(raw periodogram). However, I also got
> > > different anwsers. Following the description on the specx_anal site, I know
> > > that what specx_anal is trying to do is first calculate the fourier
> > > coefficients of sine and cosine. Then it calculate each (ak^2+bk^2)/2.
> > > That is periodogram.
> > >
> > > To prove that, I use ezfftf to do the same thing as the above but got
> > > anwsers different from what specx_anal gives. The result from specx_anal
> > > is quite larger than what ezfftf gives. Thought not totally the same, the
> > > plot shape is quite similar. I do not know whether the definitions of
> > > these two are the same. Anyone can explain that?
> > >
> > > Your help is appreciated!
> > >

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue May 29 2007 - 07:25:14 MDT

This archive was generated by hypermail 2.2.0 : Wed May 30 2007 - 16:42:09 MDT