dfm / celerite

Scalable 1D Gaussian Processes in C++, Python, and Julia
http://celerite.rtfd.io
MIT License
180 stars 35 forks source link

Normalization of PSD of asteroseismic example #53

Closed ericagol closed 7 years ago

ericagol commented 7 years ago

The peaks of the PSD are higher than in the periodogram. It would be nice to find the correct normalization, or at least point out that the normalization may be different.

dfm commented 7 years ago

I did eventually figure this out and I'll comment here for posterity:

  1. you need to multiply the power spectrum produced by Lomb-Scargle by 2*pi/N to get the PSD in our units, and
  2. you need to multiply FFT(y) . FFT*(y) by 2*pi/N^2 (for the conventions of the numpy fft package).

The 2*pi comes from the conversion between angular frequency and "physical" frequency and the factors of N come from choices in the definitions of the LS periodogram and the FFT.

I've added a stub of a documentation page about this but it might be worth adding to the paper too.