/* * This script provides an instantaneous conversion from reciprocal space to real * space for selected area diffraction (SAD) pattern measurements. * * It assumes that your diffraction pattern was collected using Gatan's * Digital Micrograph software, and that your image is properly calibrated in * reciprocal space, i.e. scale bar units display as 1/nm in DM. * * It also assumes that you have used imageJ's circle tool to measure the spot/ring * patterns concentric to the (000) direct beam. From the area measurement, the radius * (G) is found. From G = 1/d in reciprocal space, the d-spacing is calculated for * each measurement made. * * Written by: Mark Koten, Ph.D. (2/2/2018) */ // General procedure: setMeasurements(); calcD(); updateResultsTable(); // This ensures that Area will be set the next time, if it wasn't already... function setMeasurements() { run("Set Measurements...", "area centroid redirect=None decimal=3"); } // This converts the Area measurement to G (1/nm) and then d (A). function calcD() { G = newArray(); d = newArray(); for (row=0; row