Re: nonuniform FFT [message #34686 is a reply to message #34684] |
Mon, 07 April 2003 11:47   |
John Smith
Messages: 4 Registered: March 1998
|
Junior Member |
|
|
"Brad Gom" <b_gom@hotmail.com> wrote in message
news:bde24eff.0304041525.3cc5d5bb@posting.google.com...
> Hi All,
>
> has anyone out there implemented a FFT routine that handles
> nonuniformly gridded samples? The Numerical Recipes "fasper" routine
> seems to be one way to do it, but I don't want to write a DLM for it
> unless I have to. The internal IDL routine LNP_TEST is an
> implementation of the "fasper" code, but it returns only the maximum
> peak of the Lomb periodogram, and not the periodogram itself.
>
> Thanks
>
> Brad Gom
The maximum is exactly what the algorithm produces, and what it
should be used for. You should not use it to reproduce the spectrum
(even though it is a common approach by people who don't read the
paper). The algorithm calculates confidence intervals for this maximum,
which is quite useful.
If you carefully read the lomb scargle paper, you see that if performs
a least squares fit to a SINGLE (complex) sinusoid. You can certainly
apply that algorithm to a broad range of frequencies, but it is still only
fitting one sinusoid at a time.
If you wanted to least squares fit the spectrum (all the sinusoids that an
fft
would produce), you must do that simultaneously. (i.e. it is a "huge" matrix
inversion).
The problem with that is it is quite likely to be singular.
Do not attempt a DFT instead of an FFT, as there is absolutely no difference
between the two. A DFT has the same problem with gaps.
The problem is that when the sampling is not uniform, the "basis" sinusoids
are no
longer orthogonal.
I would think the best approach is to either concentrate on a few (large
amplitude)
sinusoids and employ the lomb scargle, or to interpolate the data (and
perhaps
downsample).
The best solution is to take the data again, and sample regularly (which I
would
guess is not possible).
Cheers
bob
|
|
|