Electron density calculator for 2D-hexagonal or 2D-square lattices

This Javascript calculates the 2D electron density distribution rho(rx,ry) of a 2D hexagonal or 2D square lattice from diffraction data. Choose the type of the lattice (hexagonal or square), the type of input data: intensities I(q) or amplitudes F(q) and the correction(s) already applied to the input data: 'none' means no corrections, LC means Lorentz correction (multiplied by q*q) and MC means multiplicity correction (divided by the multiplicities) have already been applied. F(q) have to be entered already LC and MC corrected. Enter the number of peaks and the value of the 2D-lattice spacing (d). Enter the peak intensities I(q) or peak amplitudes F(q) and their signs of the scattering amplitudes (+ or -). Optionally F(0) can be entered (with the proper sign +/-). For 2*Nr points rho(rx,ry) from -rmax = -rx = -ry to rmax = rx = ry will be calculated multiplied by the entered scaling factor f. If the calculation takes too long (on a slow computer) decrease Nr. The values are listed/plotted in rho(r) vs rx, ry in relative units and can be copied and pasted from the window into any text-file for further processing and graphical displaying. The plots are autoscaled if zmin=zmax, if zmax is set larger than zmin then the plots are manually color-scaled to the selected zmin and zmax values. Type of the 2D-plot (heatmap or/and contour), type of the colorscale (LUT, normal or reverse), background (b/w) for the 2D electron density map can also be selected. A version which calculates the electron densities for all sign combinations of the amplitudes of the first three diffraction peaks can be found here (vertically) or here (horizontally).


Input data rho (rx, ry) Plot Parameters
peaks d
Nr rmax
F(0)
I(h.10/s.10)
I(h.11/s.11)
I(h.20/s.20)
I(h.21/s.21)
I(h.30/s.22)
I(h.22/s.30)
I(h.31/s.31)
I(h.40/s.32)
I(h.32/s.40)
I(h.41/s.41)

2D-lattice:
data / correction:
colorscale:
color/bg:
2D-plot:
3D-plot:
f
zmin:
zmax:



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