# Homework Help: Help in convolution

1. Dec 30, 2007

### Rajini

Dear Member,
i need to know some details on convolution...
For e.g., I have X values from 1 to 186 and the corresponding Y values. If i plot i will get some spectra...Now i want to convolute that spectra/XY values with a Gaussian function with FWHM of 1.2 meV. Do you think is it possible to do convolution with these data???If so please tell me the mathematics in it?....Pls. say in step by step...
PS:X values from 1 till 186 are the modes of vibrations calculated from using QM and Y values are the mean square displacement or mass weighed Cartesian coordinates or something like that...

thanks and regards,
Rajini

2. Dec 31, 2007

### Rajini

A small correction...X values are the frequency in cm-1 or in meV

3. Jan 2, 2008

### Rajini

convolution of spectrum

Dear Member,
i need to know some details on convolution...In many research authors often tells that 'we have convoluted our theoretically simulated spectrum with a Gaussian function of some FWHM. I want to know what they actually did!!!!!!!!!
For e.g., I have X values from 2 to 3000 cm^-1 frequencies and the corresponding Y values say in intensities. If i plot i will get some spectra...Now i want to convolute that spectra with a Gaussian function of FWHM of 9.6 cm^-1 cm. Please tell me the mathematics in it?....Pls. say in step by step...
PS:X values are the frequencies obtained from GAUSSIAN03 package Y values are the mean square displacement or mass weighed Cartesian coordinates or something like that...

thanks and regards,
Rajini

4. Jan 2, 2008

### Tanja

As far as I know, a convolution works like this:
(I guess your X value dates are a function of frequency. )

1.) Take your data and Fourier transform them into the time domain with the discrete FFT (Fast Fourier Transform). You can either program your own FFT or use Matlab or any other Math program.
2.) Multiply your date in the time domain with your Gaussian. (Your will have to check which data will have to be more weighted. E.g. if you want to have the data at the edges stronger "convoluted" you will have to split your Gaussian in such a way that the highes points are on the edges ...
3.) Transfrom the resulting data back into the frequency domain.

5. Jan 2, 2008

### Rajini

because in many research papers...ppl. often tell that I/we convoluted the calculated spectrum (X and Y are Freq in cm^-1 and intensity respectively) with a Gaussian function if FWHM of 10 cm^-1.
So now i have to multiply X values by what...i think by exp[2*sqrt(ln2)]....or..pls. advice..me...i am also referring some books..
thanks

6. Jan 3, 2008

### Rajini

Hi yes i did some Fourier transformation...works good.....but some problems in it...
thanks
Raj

7. Jan 3, 2008

### JeffKoch

I don't know how to work the Latex , but your new spectral function F(x) is just defined as the integral over dx', from -infinity to infinity, of F(x')*Gauss(x-x'). Google "convolution integral" and you'll find some references. You can't go all the way to infinity with discrete data, so in practice this doesn't work well near the edge of your data set.

8. Jan 3, 2008

### Rajini

My spectrum is with 186 data points...X in cm^-1 and Y intensity...Now i want to multiply the data points with a gaussian function/integral of FWHM of 9 cm^-1. So i used some Origen software....
thanks

9. Jan 3, 2008

### blechman

definition of convolution (*): for f(x),g(x) "nice" functions:

$$(f*g)(x)\equiv\int dy f(x)g(y-x)$$

A very nice property of convolutions is that if F[f] is the Fourier transform of the function f, then:

$$F[f*g]=F[f]\cdot F[g]$$

so the F.T. of a convolution is just the ordinary product of F.T.'s. This answers your question about how to convolute your spectrum with a gaussian: multiply the F.T.'s together and then take the inverse F.T.

For more details, you can check out MathWorld (http://mathworld.wolfram.com/Convolution.html), or your favorite mathematical physics text.

10. Jan 3, 2008

### rbj

hi, i know didley about solid state or atomic physics (even though i was s'posed to learn some of it when i took a course in semiconductor physics as an EE student), but being a signal processing engineer, i know something about the topic of convolution, fourier transform, and FFT.

i just want to make sure that we're all aware of the fact that the FFT (which is the DFT, just a fast method of doing the DFT) does circular convolution in one domain (often we call that the "time domain" but it could be a function of position or something else, instead of a function of time) when you are multiplying transformed data in the other domain (usually called the "frequency domain"). in this case i guess "time" and "frequency" domains are swapped, but it doesn't matter.

essentially the Discrete Fourier Transform (and its inverse, which is qualitatively identical) maps a discrete and periodic sequence (where only one period is sent to the DFT) in one domain to a discrete and periodic sequence in the other. the DFT "assumes" (if i may anthropomorphize) that the data you pass to it is one period of length N of a periodic sequence. the DFT periodically extends the data passed to it.

this periodic extension has consequences anytime there is multiplication in one domain by anything that is not a constant. what happens in the other domain is the periodicity sorta slides in one side or the other. this had edge effects on the input data. sometimes zero-padding the input data, or padding with a reversed copy of the input data helps, but this kinda stuff needs to be tried and checked out for your application.

11. Jan 3, 2008

### Rajini

yes

i saw that website. nicely explained...but when i tried to do it experimentally..i am lost..but in my data i dont have any imaginary complex (i)..all are real..i dont know what is 'y'.....it would be better if u could explain...off course i can use the software to do such things...but i need to do it by myself..for e.g., think like this...what should be dont to each data point (X,Y)...pls explain in terms of data point rather than saying it as function...
for my work each data point represents a gaussian function..i want to construct each data point to be a gaussian with my FWHM..but the ht. will be the same...and finally add all gaussian..to get the convoluted spec.
thanks for ur hint