I(q) Diffraction Pattern of a 1D, 2D or 3D lattice

This Javascript plots the diffraction pattern I(q) of a 1D (lamellar), or of a 2D (square or hexagonal), or of various 3D (cubic) lattices, respectively. Select the lattice type (or the cubic space group between 195-230), enter the lattice spacing (size), the number n of peaks (1 to 8, peak c(0) at q=0 is not counted), their peak areas c(i), the FWHM and an optional constant y-offset of the peaks (for vertical shifting of the plots). For Nr points I(q) from q = 0 to ~ x*2*Pi/size will be plotted with x being squareroot of (h*h + k*k + l*l). The values are listed/plotted in I(q) vs q in arbitrary units (or I(2theta) vs 2theta in deg using the entered value of the wavelength which is in the same arbitrary unit as the lattice spacing) and can be copied and pasted from the window into any text-file for further processing and graphical displaying. Permitted Bragg-reflections for selected lattice types are listed here.
Diffraction pattern calculator of cubic lattices with up to h*h + k*k + l*l = 40 can be found here.

Input I(q)
peaks c(1)
lattice c(2)
size c(3)
wavelength c(4)
fwhm c(5)
Nr c(6)
offset c(7)
c(0) c(8)
overlay: yes no
x-axis: q 2theta

Author: M.Kriechbaum, TU-Graz (2012), e-mail: manfred.kriechbaum@tugraz.at