Electron density calculator for 2D-hexagonal lattices

This Javascript calculates the 2D electron density distribution rho (rx,ry) of a hexagonal lattice from scattering data. Select 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 both already LC and MC corrected. Enter the values of the first three order (1/0, 1/1, 2/0) reflections and the value of the 2D-lattice spacing (d). For 2*Nr points the 2D electron density map rho (rx, ry) from -rmax = -rx = -ry to rmax = rx = ry will be calculated and multiplied by the entered scaling factor f for the 8 sign combinations of the three scattering amplitudes. If the calculation takes too long (on a slow computer) decrease Nr. The values are listed/plotted in rho(r) vs rx, ry for all 8 combinations in relative (arbitrary) units and can be copied and pasted from the window into any text-file for further processing and graphical displaying. Each of the 8 plots are individually autoscaled if zmin=zmax, if zmax is set larger than zmin then all 8 plots are manually color-scaled to the same 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) and the number of pixels (width = height, 250 < np < 2000) for the 8 electron density maps can be selected.

Data Input rx, ry, rho(rx,ry) Plot Input
 data type: I(q) / none I(q) / LC I(q) / LC+MC F(q) / LC+MC (1/0) (1/1) (2/0) d rmax Nr f

 colorscale: Jet Hot Rainbow Earth Electric Viridis Cividis Portland Blackbody Picnic RdBu YlGnBu YlOrRd Bluered Greys Blues Reds Greens color/bg: normal/white reverse/white normal/black reverse/black 2D-plot: heatmap heatmap-GL heatmap-smooth contour contour+heatmap contourlines zmin: zmax: pixels:

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