|
From: | Isak Delberth Davids |
Subject: | Re: FFT: Finding signal frequency at wrong place |
Date: | Sun, 5 Dec 2010 11:04:44 +0200 |
On Sat, Dec 4, 2010 at 3:51 PM, Isak Delberth DavidsI'm not familiar with gamma-ray signals and how to use the FFT to get
<address@hidden> wrote:
> I do a FFT on the attached strictly increasing time data of gamma-ray
> signals as observed. I try to find any embedded frequencies. First I check
> if the code below works for user-defined frequencies. I thus add two known
> sine waves. Running the code, I find two frequencie, but at definitely wrong
> frequencies. Do I mess with frequency scaling or what? I expected the peaks
> near 0.1 and 0.05. Code at end
the frequencies (Is 't' a list of times that a gamma-ray was
detected?) However, I do know why you are not seeing your expected
peaks. The FFT expects uniformly sampled data and the 't' is not
uniformly sampled. In other words, after:
The artificial peaks will only show up correctly if diff(t) is
t = t + ampl*sin(2*pi*freq_test1*t) + ampl*sin(2*pi*freq_test2*t);
constant. For example, if you make a change like this:
T = linspace(min(t),max(t),numel(t))' ;
t = t + ampl*sin(2*pi*freq_test1*T) + ampl*sin(2*pi*freq_test2*T);
Then you will see two peaks added to your spectrum.
--judd
[Prev in Thread] | Current Thread | [Next in Thread] |