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 #67750 is a reply to message #67632] Sat, 22 August 2009 10:51 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Aug 20, 12:53 pm, "R.G. Stockwell" <noemai...@please.com> wrote:
> "Craig Markwardt" <craig.markwa...@gmail.com> wrote in message
>
> news:cab41ca6-e1a4-4f73-851f-8b25ab0c1e58@k26g2000vbp.google groups.com...
> On Aug 19, 4:42 pm, "R.G. Stockwell" <noemai...@please.com> wrote:
>
>> "Paolo" <pgri...@gmail.com> wrote in message
>
>> basically yes, abs(fft(ts))^2, and comparing it to chisquare from the
>> IDL functions.
>> I have worked on it, but I think the result is off by a factor of 2.
>> That is a factor of 2 too stringent.
>
> ...
>> Perhaps you can check my understanding. If we have a 95% significance
>> level,
>> then if we make a spectrum with 1000 points, shouldnt 50 of them be above
>> that 95% line?
>
> Let's say we have a time series, defined like this,
>    LC = time series values (array)
>    ERR = measurement uncertainty (array) of each LC point.
>
> I define the power spectrum in the following way,
>   POW = ABS(FFT(LC,+1))^2 * ( 2 / TOTAL(ERR^2) )
> *************************************************
>
> 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.

Bob, I was just telling you (and showing explicitly) what "works for
me." My use of the FFT(,+1) notation arises because the documentation
indicates it is faster, but also because I'll put in my own
normalization factors, thank you very much.

The "conventions" for FFT direction and normalization are so varied
across different fields, that there really is no convention!


> 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.

I believe my power of 2 formally comes from adding + and -
frequencies, one for each. But in any case, it's a convenient scaling
because as it is defined, it allows one to directly do a chi-square
probability test for any given power, i.e. CHISQR_PDF() or MPCHITEST
(), since each power is distributed exactly as a chi-square with 2
d.o.f. As we've seen, the scaling is nearly arbitrary, so for
probability tests, I find it best to scale to a useful quantity.
[ For variability measures, it's another matter. ]

Craig
[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: Thu Oct 09 20:58:39 PDT 2025

Total time taken to generate the page: 0.31707 seconds