# Fourier Transform of Morlet wavelet Function?

One definition of the Morlet wavelet function is given by: $$\frac{1}{\sqrt{\pi f_b}}e^{\frac{-t^2}{f_b}}e^{j2\pi f_c t}$$ The Fourier transform of this equation is: $$e^{-\pi^2 f_b(f-f_c)^2}$$ (is it right)?
First I attempted to plot the FFT of Morlet function by FFT function in Matlab, then I've plotted the Fourier transform function directly. I've expected to see same plots, but unfortunately they have different magnitude (why?). I publish the plot and my codes, do you have any idea why this happened? Is there any problem in my codes? Or any problem in the obtained Fourier transform? Or any problem in Matlab built-in FFT function? I wrote this script to get those plots:

clear all;
fS = 500;
tStart= -4;
tStop= 4;
timeVector = linspace(tStart,tStop, (tStop-tStart)*fS );
fC = 2;
fB=2;
timeMask((timeVector >= -fB/2) & (timeVector <= fB/2)) = 1;
psiWavelet = ((pi*fB))^(-0.5).*...                   % Morlet function
exp(2*1i*pi*fC.*timeVector).*exp(-timeVector.^2/fB); % Morlet function
%      FFT plot by matlab bulit-in FFT function
Nfft =10*2^nextpow2(length(timeVector));
FFT =fftshift(abs(fft(psiWavelet,Nfft)));
freqs=[0:Nfft - 1].*(fS/Nfft);
freqs(freqs >= fS/2) = freqs(freqs >= fS/2) - fS;
freqs=fftshift(freqs);
figure(2);
subplot(1,2,1)
plot(freqs, FFT);
xlim([-1  5]);
xlabel('Frequency / Hz');
title (sprintf('Fourier Transform'));
%     FFT plot by its direct fourier transfrom function
f_psi=exp(-(pi^2*fB)*(freqs-fC).^2);
subplot(1,2,2)
plot(freqs,f_psi)
xlim([-1  5]);

• Your first graph should be plotted in the time domain as the x-axis, instead of the frequency domain as stated in your code. Feb 11, 2014 at 15:51
• I think that does not make any difference @freak-warrior
– SAH
Feb 11, 2014 at 19:50
• The phase in the wavelet formula is missing a $t$ in the exponent, the transform is looking right. Feb 11, 2014 at 22:41

If you approximate the Fourier transform

$$X(f)=\mathcal F(x)(f)=\int_{-\infty}^\infty x(t)\,e^{-2\pi j\,ft}\,dt$$

by the discrete Fourier transformation for by sampling on the time segment $[-T,T]$ as

$$X(f_n)\approx \sum_{k=-N}^{N-1} x(k\tau)\,e^{-2\pi j\,f_nk\tau}\,\tau=s[n]\,\tau$$

with $T=N\tau$, $f_n=n/(N\tau)=n/N*f_s=n/T$, $n=-N,...,N-1$, $s$ the result of FFT on the sampled $x$ sequence after shift, ...

then you have to multiply the result of the FFT method by $\tau=T/N=1/f_s$.

• Oh this make sense now, do you mean the term 1/N which we must put behind the DFT? @lutzl
– SAH
Feb 11, 2014 at 19:56
• In principle, yes. But the step size of the Riemann sums distributes the factor 1/N between the FFT and iFFT differently from the usual procedure. Here $dt=\tau=1/f_s$ and $df=f_s/N$. Feb 11, 2014 at 22:24

For the Fourier transform (FT) of the Morlet wavelet, I also arrived at the same equation as that of @Electricman. Based on that equation, I sought a relationship between $$f_b$$ and the standard deviation of the Gaussian form of the FT. Is there any citable published literature (book or journal article) arriving at the following derivation?

$$X(f)=\mathcal F(x)(f)=e^{-\pi^2 f_b(f-f_c)^2}$$

Rearranging this into the familiar Gaussian form, $$X(f) = e^{\frac{-(f-f_c)^2}{2\left({\frac{1}{\pi\sqrt{2f_b} })}\right)^2}}$$

The standard deviation $$(\sigma_f)$$ of this frequency domain Gaussian is then, $$\sigma_f = \frac{1}{\pi\sqrt{2f_b}}$$ Rearranging it, $$f_b = \frac{1}{2{(\pi\sigma_f)}^2}$$