Help With Convolution: Learn How to Convolute XY Values With a Gaussian Function

In summary, the conversation discusses the topic of convolution and how it can be applied to a spectrum or data set. The process involves Fourier transforming the data, multiplying it with a Gaussian function in the time domain, and then transforming it back into the frequency domain. Some caution should be taken with edge effects when using this method.
  • #1
Rajini
621
4
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
 
Physics news on Phys.org
  • #2
A small correction...X values are the frequency in cm-1 or in meV
 
  • #3
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
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
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
Hi yes i did some Fourier transformation...works good...but some problems in it...
thanks
Raj
 
  • #7
I don't know how to work the Latex :smile:, 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
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
definition of convolution (*): for f(x),g(x) "nice" functions:

[tex](f*g)(x)\equiv\int dy f(x)g(y-x)[/tex]

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

[tex]F[f*g]=F[f]\cdot F[g] [/tex]

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
Tanja said:
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.

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 sort of 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
yes

i saw that website. nicely explained...but when i tried to do it experimentally..i am lost..but in my data i don't have any imaginary complex (i)..all are real..i don't 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 don't 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
 

1. What is convolution and why is it useful in scientific research?

Convolution is a mathematical operation that combines two functions to create a new function. It is useful in scientific research because it allows researchers to analyze and model complex systems and data by breaking them down into simpler components.

2. How does convolution with a Gaussian function work?

Convolution with a Gaussian function involves multiplying each data point of a given function by the corresponding data point of a Gaussian function, and then summing all of these products. This creates a new function with a smoothed and blurred appearance.

3. What are the benefits of convoluting XY values with a Gaussian function?

Convoluting XY values with a Gaussian function can help to reduce noise and highlight important features in the data. It can also make the data easier to analyze and interpret by smoothing out any irregularities or outliers.

4. Are there any limitations to using convolution with a Gaussian function?

One limitation is that the choice of the Gaussian function's parameters, such as the standard deviation, can greatly affect the resulting convoluted function. Additionally, convolution with a Gaussian function may not be appropriate for all types of data and may not accurately represent the underlying processes in some cases.

5. How can I learn how to convolute XY values with a Gaussian function?

There are many resources available online, such as tutorials and videos, that can help you learn how to convolute XY values with a Gaussian function. It may also be helpful to consult with a mentor or take a course in mathematical modeling or data analysis.

Similar threads

  • Programming and Computer Science
Replies
1
Views
2K
Replies
1
Views
1K
Replies
2
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
3K
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
4K
  • Programming and Computer Science
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
9K
  • Advanced Physics Homework Help
Replies
1
Views
3K
Back
Top