# Gaussian wavelet generation with a given frequency

How can I generate a Gaussian wavelet (time domain) with a given central frequency.

I mean if I take the Fourier Transform then its spectrum should be around that given central frequency instead of zero. For example the peak of spectrum is 20Hz and its side lobes becomes nearly zero around $20\pm 10$.

I carried out a few coding exercise which I tried are here. Link

• Wavelets are certainly relevant to Earth Science, but I suspect you might get better answers to this particular question at dsp.stackexchange.com . – Pont Feb 5 '16 at 7:56

Amartya,

Maybe this will help clarify:

Convolution in the time domain is equivalent to multiplication in the frequency domain. This is how we build simple convolutional seismograms.

s(t)=w(t)*r(t) => S(f)=W(f).R(f)

However, what you are trying to do is pretty much the exact opposite. A sinusoid in the time domain is a spike in the frequency domain. And what you are trying to do is "convolve" a gaussian with this spike, all in the frequency domain. But the same rule applies the other way: convolution in the frequency domain is equivalent to multiplication in the time domain.

S(f)=W(f)*R(f) => s(t)=w(t).r(t)

In order to get a wavelet (in time) whose Fourier transform is a Gaussian centered at a certain frequency, you will need to multiply a sinusoid of that certain frequency by a Gaussian window (in time). This "Gaussian times a sinusoid" is called a Morlet wavelet (or Gabor wavelet in EE).

nt=500; % Number of samples in your wavelet
dt=0.001; % Sample rate in time
t=dt*((1:nt)-ceil(nt/2))'; % Time vector for wavelet symmetric around zero
sinusoid=cos(2*pi*fdom.*t+phase); % Sinusoid of desired frequency and phase
win=exp(-(1*t*fdom).^2); % Gaussian window appropriate for dominant frequency
wav=win.*sinusoid; % Final Morlet wavelet


Hope this helps,
Antonio

If I understand the question, I don't think you can do what you want to do. The spectrum of a Gaussian time series must contain frequencies down to DC, i.e. very low frequencies (Python code from scipy.org):

A wavelet whose spectrum is a Gaussian is called a Ricker wavelet, or sometimes Mexican Hat wavelet. I often use this wavelet to model seismic reflection data. It has a central frequency, and is bandlimited. As such, the wavelet oscillates around zero amplitude — it does not have a DC component:

• Thanks for your reply @kwinkunks. My purpose for was to use it for the estimation of attenuation (eoas.ubc.ca/research/cdsst/Tad_home/GPY001542.pdf ; eqn. 18,19). I am inclined towards using Gaussian since I have synthetics with a Gaussian source, second the analysis window selection is somewhat easier. Is there any open source code for Q estimation from seismic? – Amartya Feb 7 '16 at 6:51
• Those authors are referring to the Ricker wavelet, which has a Gaussian spectrum. I don't know of any software with that function built in, I'm afraid. – kwinkunks Feb 7 '16 at 12:12

(Sorry for the double post, got an image limit)

Also, as you make that Gaussian window (in time) skinnier and skinnier (by changing that "1" in the window function), you will make the Gaussian in the frequency domain wider and wider, as per the Fourier uncertainty principle.

Finally, I just wanted to point out that a Ricker wavelet does not have a Gaussian amplitude spectrum. It's close but not quite. The Ricker amplitude spectrum is slightly skewed. And they do seem to be using Ricker wavelets in the paper you cited.

Ok now I'm done. Good luck!
Antonio