Calc dSpace

Revision as of 22:24, 15 May 2018 by Makoten (talk | contribs) (Tips)


This plugin can be used to quickly calculate the interplanar spacing values (d) directly within imageJ without copying the results table to another program like Excel to then convert measurements into d-values, which saves you time. It is also remarkably easy to use, accurate, and robust for both spot and ring electron diffraction patterns.

How it works

Use imageJ’s circle tool (shift + oval 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. The calculated values for G and d are added to the imageJ Results window in new columns.

Image Requirements

You need to have a properly calibrated diffraction pattern for the calculations to work. Most TEM operators use Gatan’s Digital Micrograph software for image collection. If you are using DM, then it is likely that this plugin will work right away, or will work with the help of your TEM technician.

The preferred image is a .dm3 file (Gatan’s format) that is properly calibrated in reciprocal space (see Gatan’s documentation). The easiest way to check this is that the scale bar in your images is displayed in DM with 1/nm units.


The example below is from a single crystalline STO (strontium titanate) sample. It illustrates how the measurements should be made in order to ensure the plugin is calculating the d-spacing values accurately. Make your measurements working from the inner most spots/rings outwards.

New Fig 1.jpg

The table on the left is the raw imageJ measurements that were made by drawing a circle and pressing the "m" key on the keyboard. The table on the right is the result of the plugin. Just go to the TEM menu and select calc dSpace. The calculation is automatic.

New Fig 2.jpg


  1. If you hold down both control and shift while clicking on one of the white squares on the circle and dragging, the circle expands and contracts concentrically.
  2. The centroid is there to display the x and y position of the center of the circles you are drawing. Use it to make sure it is at the center of the direct spot (000), and that it stays there throughout your measurements.
  3. Another way to verify your image calibrations have been done properly is to call up the image info window in imageJ (just type the letter “i”) and look for a line like this: root.ImageList.1.ImageData.Calibrations.Dimension.0.Units = 1/nm. If it = nm, then it won’t work.
  4. You can enable a somewhat useful text window that summarizes your results by opening up the plugin in a text editor and deleting the leading slashes on line 29.
  5. The plugin may not work right the first time you try to use it, this would be because you do not have the area measurement enabled. Running the plugin will set the measurements it needs, so if you redo your measurements with the circle tool, it should work the second time.