Convolving experimental data with a function
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm analyzing x-ray diffraction data that was collected using "pink" beam (the beam contained a range of energies, as opposed to just 1 energy). I'm trying to separate the instrument response profile out of the collected data so that only physically meaningful information about the specimen remains. I've read that an effective way to do this is by convolving the instrument response (which we measured experimentally) to a function that will represent the real signal from the specimen (which is usually a series of Gaussian or Lorentzian function centered at certain scattering angles), and then fitting this convolution to the experimental data. However, I've tried performing this convolution and I don't understand the results. For example, if I convolve the instrument response with two Gaussians which are centered at different angles but otherwise identical, the resulting peaks are different heights. Changing the width of the Gaussian also seems to change the peak position in the convolved data as well as the peak height. I've attached the instrument response data and the code I'm using with one of the Guassian functions I've tried. Thanks for any help!
A = 1;
c = 0.1;
instrument = xlsread('spectrum.xls');
twothetaDegrees = instrument(:,1);
intensity = instrument(:,2);
marker = find(intensity == max(intensity));
intensity = intensity';
intensity = [intensity(marker:end) intensity(1:marker-1)];
examplefunction = A.*exp(-((twothetaDegrees - 15.5)./(2.*c)).^2) + A.*exp(-((twothetaDegrees - 17.5)./(2.*c)).^2);
fy = examplefunction';
gy = intensity;
GG = fft([gy]);
FF = fft([fy]);
ht = real(ifft(FF.*GG));
plot(twothetaDegrees,ht)
2 Kommentare
Image Analyst
am 14 Dez. 2015
Can you insert the plot into your question? Also, I don't understand the sentence/concept "convolving the instrument response to a function". You convolve two functions, like a signal and a kernel or point spread function. What does it mean if you convolve just one signal "to a function"? The fft is shifted (the origin is at both ends) so did you take that into account when you made your examplefunction?
Antworten (0)
Siehe auch
Kategorien
Mehr zu Instrument Connection and Communication finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!