# Filtering out a specific Gaussian from a signal using Fourier concepts

I have been wondering about a problem and need some help. Let's say I have a 1-d time signal (discrete), I also have the knowledge that the signal consists of repeated Gaussians with known fixed standard deviation and for starters let's say of known a fixed amplitude. So the signal consists of series of similar Gaussians and then obviously there is the random noise. Is there any way to use that knowledge in frequency filtering to get rid of the noise?

• There are many possible options. However there is a discrepancy between the title and the text (why and what are Fourier concepts?). And how random is your noise? – Laurent Duval Dec 10 '16 at 20:51
• I have added an image of the signal, the high peaks are supposed to be Gaussians having the same standard deviation. Is there a way to figure using fourier transform, to filter out frequencies that don't correspond to the gaussian? – Hemant Kumar Dec 10 '16 at 21:41
• Great. A possibility to post the data file? – Laurent Duval Dec 10 '16 at 21:43
• filetea.me/t1sxuwWYqqVRx6FUxsw4d947Q – Hemant Kumar Dec 10 '16 at 21:51
• If you are ok using a Wavelet transform instead of Fourier transform, you may be able to use a "Gaussian"-like wavelet function (Morlet or Gabor wavelet, maybe?) Your data file link doesn't work. – Atul Ingle Dec 10 '16 at 22:01

## 1 Answer

You can try performing a matched filtering with the gaussian of interest. See the below python code for an example. It is not exactly a work in the Foruer domain, (but can be seen as such) and remove thes noise just leaves the Gaussians. You need to adapt the sigma of your gaussians (i just did some rough trial-and-error here)

signal = np.loadtxt("C:/local/mmatthe/work/sheet1.csv")
t = np.arange(-signal.shape[0]/2, signal.shape[0]/2)
t2 = np.arange(-20, 20)
sigma2 = 10
gauss = lambda t: 1/np.sqrt(2*np.pi)*np.exp(-(t)**2/(2*sigma2))
gauss_samples = gauss(t2)
gauss_samples /= np.sqrt(sum(gauss_samples**2))

plt.figure(figsize=(10, 5))
plt.subplot(1,2,1)
plt.plot(t, signal)
plt.plot(t, gauss(t))

plt.subplot(1,2,2)
plt.plot(np.convolve(gauss_samples, signal));


• Thanks for the answer. How about gaussian with same standard deviation but varying amplitude( in a small range). – Hemant Kumar Dec 12 '16 at 14:19
• varying amplitude is not a problem. The amplitude after filtering is proportional to the amplitude of the input gaussian. – Maximilian Matthé Dec 12 '16 at 14:42