Automatic lattice determination of a crystal. (A) The original power spectrum (PS). (B) The program 2dx_peaksearch replaces pixels on the X- and Y-axes and at high-resolution outside of a circular mask with the average grey value. This masked PS is then high- and low-pass filtered. (C) Streak artifacts together with X- and Y-axes are again masked with the mean in (C). (D) The origin-shifted and weighted averaged PS. (E) The first (circles) and second (squares) lattices are overlaid over the original PS, as automatically determined by 2dx_findlat. The first vector of each lattice u=(1,0) is plotted in red, the second one v=(0,1) in dark blue. Note that the brightest diffraction spots in the original PS were correctly recognized by 2dx_findlat as second order spots with coordinates (1,1), (2,0) and (−1,1), corresponding to a rectangular real-space lattice of a=81Å, b=136Å, and γ=90°. (F) The program 2dx_getlat in this example reported a lattice that covers most but not all lattice nodes, and is a wrongly indexed lattice due to the lack of additional information. This lattice, however, can still be transferred into the correct lattice as shown in (E) with the script “Evaluate Lattice” in 2dx_image (see text).