Diffraction calculator of a 2D-square lattice.

Enter the number of shells in the 2D-square unit cell, the shape of each shell (circular or square), their radii r and their electron densities c and lattice spacing d (a=b). The radius r in case of a square is the radius of the inscribed circle. The radii should be increasing from 1 to 10 and intersecting of squares and circles should be avoided. The diffraction peaks up to hk-max ((h*h+k*k) < 400) of the square lattice will be calculated. The values are listed as h, k, h*h+k*k, multiplicity and y-data (scattering amplitudes Fhk). These diffraction peaks are plotted either as amplitudes F(q) or as intensities I(q) with a chosen FWHM-value. Optionally the intensities I(q) can be multiplied by the multiplicities of the respective peaks (*M) and further also be divided by hk^2 (Lorentzfactor, /x**2). Units are arbitrary (A or nm) and can be copied and pasted from the window into any text-file for further processing and graphical displaying. The electron density will then be recalculated from the calculated diffraction peaks and plotted for Nr points (2D) from the center of the symmetric unit cell for n x n cell units. F(0) will also be calculated and used in the electron density calculations (for proper scaling and offset of the electron density).

Input h, k, h*h+k*k, multiplicity, y-data(q) Output/Plot
 shells 10 9 8 7 6 5 4 3 2 1 hk-max a=b: F(0): r(1) c(1) circ squ r(2) c(2) circ squ r(3) c(3) circ squ r(4) c(4) circ squ r(5) c(5) circ squ r(6) c(6) circ squ r(7) c(7) circ squ r(8) c(8) circ squ r(9) c(9) circ squ r(10) c(10) circ squ

 Nr (points, 2D): unit cells (n x n ): colorscale: Jet Hot Rainbow Earth Electric Viridis Cividis Portland Blackbody Picnic RdBu YlGnBu YlOrRd Bluered Greys Blues Reds Greens colorscale/background: normal/white reverse/white normal/black reverse/black 2D-plot: heatmap heatmap-smooth contour contour+heatmap contourlines 3D-plot: surface surface+contour colorscale-zmin: colorscale-zmax: Nr (points, 1D) FWHM y-data-correction F(q) / LC+MC I(q) / LC+MC I(q) / LC I(q) / none scaling factor offset overlay (1D) no overlay

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