Scripting Resources for DigitalMicrograph™


Dave Mitchell's DigitalMicrograph™ Scripting Website

Home | Scripts | Examples | Functions | Recent Updates | Tutorials | Resources | Publications | Consulting | Projects | Contact & Bio | Private | Search


Ellipse Fitting Analysis
Uses an ellipse fitting method to analyse selected area electron diffraction patterns from polycrystalline materials. Identifies and corrects any elliptical distortion which may be present. Stores correction factors which allow distortions in single crystal spot patterns to be corrected. The pattern centre and ring dimensions/d-spacings are reported.
version:150801, v1.0
D. R. G. Mitchell and J. A. van den Berg

The main ellipse fitting analysis script works from an initial guess at the centre provided by the user. The script thresholds the patterns and identifies each diffraction ring. Ellipses are then fitted to these rings. This enables the centre to determined accurately and the presence of any elliptical distortion, arising from the projector lens system, to be detected. This distortion can be corrected by the script. If the pattern has a camera length calibration present, the diffraction ring d-spacings are reported. A companion script (Undistort) allows distortion corrections derived from ring patterns, to be stored and applied to spot patterns (single crystal) acquired under identical conditions. This may provide improved accuracy and precision in measurements of systems where minor lattice parameter changes due to compositional/strain effects are being assessed.

Aside from routine measurement of polycrystalline diffraction patterns, this script may be a useful assessment tool for the qualification of newly installed microscopes, especially those with an omega filter lens. Typical installation specifications call for a diffraction pattern distortion of <1%. This value is critically dependent on the mechanical alignment of the omega lens.

This script functionality is supplied as a plugin file. Copy the EFAnalysis.gtk file to the DigitalMicrograph plugins folder. Then launch DigitalMicrograph and an EF Analysis menu will appear. Detailed instructions for installation and use are provided in the manual in the zip archive.

The work is described in Ultramicroscopy, 160, (2016), 140-145.

System Requirements
Tested on GMS 1.84 (XP) and GMS 2.3 (Win 7).
Known Issues
Included Files
Plugin, test pattern and manual in a zip archive.
Source Code

Plugin provided.