Re: Spectra of Unequally Sampled Data
- From: dbd <dbd@xxxxxxxx>
- Date: Wed, 16 Apr 2008 19:47:43 -0700 (PDT)
On Apr 16, 6:25 pm, Greg Heath <he...@xxxxxxxxxxxxxxxx> wrote:
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
Greg
You can only compare the ajj-dft to an FFT with the uniformly spaced
time samples the FFT requires. The ajj-dft -is- a DFT for uniformly
spaced samples. (And Matlab already includes a better version.)
Unfortunately the OP asked about non-uniformly spaced samples. For non-
uniformly spaced samples, the ajj-dft does not always give results
consistent with a DFT.
Dale B. Dalrymple
.
- Follow-Ups:
- Re: Spectra of Unequally Sampled Data
- From: Greg Heath
- Re: Spectra of Unequally Sampled Data
- References:
- Spectra of Unequally Sampled Data
- From: David DeVilbiss
- Re: Spectra of Unequally Sampled Data
- From: Greg Heath
- Re: Spectra of Unequally Sampled Data
- From: dbd
- Re: Spectra of Unequally Sampled Data
- From: Greg Heath
- Re: Spectra of Unequally Sampled Data
- From: dbd
- Re: Spectra of Unequally Sampled Data
- From: Greg Heath
- Spectra of Unequally Sampled Data
- Prev by Date: Re: HOW TO COMBINE MORE GUIs INFORMATIONs
- Next by Date: Re: Moderated
- Previous by thread: Re: Spectra of Unequally Sampled Data
- Next by thread: Re: Spectra of Unequally Sampled Data
- Index(es):
Relevant Pages
|