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

Home » Public Forums » archive » Re: CHISQR_CVF question.
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: CHISQR_CVF question. [message #67631] Thu, 20 August 2009 09:57 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
R.G. Stockwell writes:

> Craig, Sorry but I am a bit confused here.
>
> using the +1 direction is the "inverse" FFT here isn't it?
> and hence it lacks the 1/N normalization that occurs on the "forward" FFT.
> Is that right?
>
> Also, total(err^2) happens to be equal to the length here, so i looks like
> you are doing an inverse FFT ^2, and then dividing by len.
>
> BUT, that is the same as doing the forward FFT (with 1/N), squaring it, then
> multiplying
> by len.
>
> So, it almost looks like this just happens to be by coincidence the same as
> pow = fft(lc, /forward)*length
>
> And you have a factor of 2, which is coincidentally also the power of your
> spectrum. and it appears that again this may have just coincidentally
> cancelled out.
>
>
> basically, I am starting with a normalization of the spectrum as:
>
> d = 120*randomn(seed,len)
> spe = fft(d)
> pspe = abs(spe[0:len/2-1])^2
>
> ; normalize wrt length and variance, so we always get the same result
> pspe = pspe*(len)
> pspe = pspe/stddev(d)^2
>
>
> with this normalization, the mean of my spectrum is always the same.
> (as i vary the length of the time series, and as i vary the standard
> deviation,
> above i have a stdev of 120).
>
> Are you saying that there should be a factor of 2 in my power spectrum,
> i.e. I need a final line that states pspe = pspe*2?
> Because, when I do this, I do get the expected result. By expected I mean I
> calculate the number of points above the cutoff level (90%) and I find
> approximately
> 10% above, 90% below. ditto 95%, 99%.
>
> But, I want to justify that factor of 2.

You know what? I'm just going to stick with mastering
that down-the-line backhand, thank you very much!

Cheers,

David

--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Loop Multiple Files and Rename
Next Topic: Re: Voxels in IDL

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

Current Time: Wed Oct 08 19:30:03 PDT 2025

Total time taken to generate the page: 0.00511 seconds