Re: Spectra of Unequally Sampled Data



On Apr 16, 12:28 pm, dbd <d...@xxxxxxxx> wrote:
On Apr 16, 2:07 am, Greg Heath <he...@xxxxxxxxxxxxxxxx> wrote:





On Apr 15, 5:13 pm, dbd <d...@xxxxxxxx> wrote:

On Apr 14, 11:40 pm, Greg Heath <he...@xxxxxxxxxxxxxxxx> wrote:

On Apr 14, 2:28 pm, "David DeVilbiss" <d...@xxxxxxxxxxxxxxxx> wrote:

I need to calculate the spectra of unequally sampled data.
The data is from LDV (Laser Doppler Velocimetry).  Two
packages from the Mathworks User File Exchange come to
mind, Automatic Spectra Analysis and the ARMASA toolbox.

The documentation for these is a bit tough for me to
understand.

So, given a set of data points sampled at unequal time
intervals, how do I get to spectral results?

Thanks, Dave

OPTION 1:

Use the following DFT (NOT FFT!) algorithm by AJ Johnson
where you can specify the frequencies for which you want
spectral measurements

function X=dft(t,x,f)
% function X=dft(t,x,f) % By AJ Johnson
% Compute DFT (Discrete Fourier Transform) at frequencies given
% in f, given samples x taken at times t:
% X(f) = sum(k=1,N) { x(k) * exp(-2*pi*j*t(k)*f) }
%
t   = t(:);                      % Format 't' into a column vector
x  = x(:);                       % Format 'x' into a column vector
f   = f(:);                      % Format 'f' into a column vector
W = exp(-2*pi*j * f*t');
X  = W * x;

OPTION 2:

Interpolate x onto a uniform grid and use MATLAB's fft.

Hope this helps.

Greg

Greg

The DFT is usually defined with uniform frequency spacing and uniform
time spacing. Extensions to other time samplings of waveforms should
give the same coefficients at usual DFT frequencies as the usual DFT
sampling gives for a given waveform. The code in Option 1 does not do
this so I would say:

Option 1 is not a DFT

You are wrong.

A DFT is a discrete variable fourier transform. Pure and simple.
The reason why it is mostly used with uniform sampling is obvious.
However, to say the name DFT excludes nonuniform sampling is
just plain wrong.

Hope this helps.

Greg

Greg

I don't object to non-uniformly spaced samples, I don't object to non-
uniformly spaced frequencies.

I don't claim it is not a DFT because it uses non-uniformly spaced
samples. I claim it is not a DFT because it produces the wrong values
at the uniformly spaced frequencies that the conventional DFT
calculates. It fails to be consistent with the DFT of the same
waveform sampled and calculated at uniform spacing.

The code does calculate a discrete variable transform, however, to
call it the DFT is simply wrong.

In the past I have compared MATLABS FFT, A. J. Johnson's
DFT and the least square algorithm by Lomb & Scargle. I
know the first two results were the same.

Can't quite remember the comparison of the latter two

... I was looking at nonuniformly spaced Doppler radar data
from a spinning and precessing target. I was trying to determine
how many precession periods were necessary for the estimation
of a sufficiently accurate precession frequency ...

Hope this helps.

Greg

.



Relevant Pages

  • Re: Spectra of Unequally Sampled Data
    ... Automatic Spectra Analysis and the ARMASA toolbox. ... Use the following DFT algorithm by AJ Johnson ... % Compute DFT at frequencies given ... Interpolate x onto a uniform grid and use MATLAB's fft. ...
    (comp.soft-sys.matlab)
  • Re: Spectra of Unequally Sampled Data
    ... Automatic Spectra Analysis and the ARMASA toolbox. ... % Compute DFT at frequencies given ... The DFT is usually defined with uniform frequency spacing and uniform ... The reason why it is mostly used with uniform sampling is obvious. ...
    (comp.soft-sys.matlab)
  • Re: Spectra of Unequally Sampled Data
    ... Automatic Spectra Analysis and the ARMASA toolbox. ... % Compute DFT at frequencies given ... give the same coefficients at usual DFT frequencies as the usual DFT ... The reason why it is mostly used with uniform sampling is obvious. ...
    (comp.soft-sys.matlab)
  • Re: dft : property of symmetry for real & even seq
    ... you should use a discrete cosine transform (DCT). ... is why people normally have a complex-output DFT (even if they have ... positive frequencies (as I understand it when the time domain samples ... The relationship between the real DFT polar form and the complex DFT ...
    (comp.dsp)
  • Re: Why window in time domain before FFT?
    ... alledged *inherent* periodic nature of the DFT (which is what the FFT ... DTFT is sampled at N equal frequencies from -Nyquist to +Nyquist, ... FFTs of these signals will produce the ...
    (comp.dsp)