Simulation d'un diffractogramme par rayons X du quartz fortement bruité, et sa transformée de Fourier.
La partie gauche du spectre contient le signal ; pour des fréquences supérieures à l'inverse de la largeur des pics, le spectre ne contient que du bruit.
Simulation of the X-ray diffratogram of quartz with a strong noise, and its Fourier transform.
The left part of the spectrum contains the signal; for the frequencies higher than the inverse of the width of the peaks, the spectrum contains only noise.
Auteur/author : Christophe Dang Ngoc Chan (cdang)
Réalisé avec/made with Scilab
clear;clf;
// domaine : 20 à 50°, pas de 0,02°
pas=0.02; // step size
freq=1/pas; // sampling frequency
x=[20:pas:50]; // 2-theta range
// hauteur maximale, largeur et fond continu
h=1000; // maximum height
s=0.1; // peak width (standard variation)
fond=50; // continuous background
// Fonction de Gauss
function [y]=gauss(x)
y=2.5*h/(sqrt(2*%pi))*exp(-x^2/(2*s))
endfunction
// pics, désignés par les indices de Miller hkl
p100 = 0.16*gauss(x-20.86);
p101 = gauss(x-26.64);
p110 = 0.09*gauss(x-36.544);
p102 = 0.08*gauss(x-39.465);
p111 = 0.04*gauss(x-40.3);
p200 = 0.06*gauss(x-42.45);
p201 = 0.04*gauss(x-45.793);
p112 = 0.13*gauss(x-50.139);
// diffractogramme
d = p100 + p101 + p110 + p102 + p111 + p200 + p201 + p112 + fond;
// bruit
N = size(d); n=N(1,2);
b = rand(1,n,'normal');
b1 = b.*sqrt(d);
// Calcul
f=d+b1; // diffractogramme
ptf = abs(fft(f)); // puissance de la transformée de Fourier
for i=1:n
if ptf(i)>2e+9 then ptf(i)=2e+9; // saturation
end
end
k=freq*(1:n)/n; // échelle x TF
// Affichage
subplot(2,1,1)
plot2d(x,f,style=2,rect=[20,0,50,h+fond])
xtitle('Simulation du diffractogramme du quartz','2 thêta (°)','intensité (coups)')
subplot(2,1,2)
plot2d(k,ptf,style=2,rect=[0,100,20,1e5],logflag='nl')
xtitle('Transformée de Fourier du diffractogramme','fréq.','Puissance (éch. log.)')
Licensing
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
This licensing tag was added to this file as part of the GFDL licensing update.http://creativecommons.org/licenses/by-sa/3.0/CC BY-SA 3.0Creative Commons Attribution-Share Alike 3.0truetrue
Captions
Add a one-line explanation of what this file represents
Simulation d'un diffractogramme par rayons X du quartz fortement bruité, et sa transformée de Fourier. ---- Simulation of the X-ray diffratogram of quartz with a strong noise, and its Fourier transform. Auteur/author : Christophe Dang Ngoc Chan ([[us
File usage
No pages on the English Wikipedia use this file (pages on other projects are not listed).