Scripting Resources for DigitalMicrograph™

banner

Dave Mitchell's DigitalMicrograph™ Scripting Website

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

 

STEM Diffraction
Function
Captures and analyses diffraction patterns at each point in a 2D STEM scan.
Version
version:20220526, v1.1
Author
D. R. G. Mitchell
Acknowledgements
-
Comments

Updated to v1.1 to address many bugs and to effect several improvements. If you have already downloaded v1.0, please replace that STEM_Diffraction.gtk package in your plugins folder with the new version available here.

This suite of scripts captures and analyses diffraction patterns at each point in a 2D STEM scan grid. It uses DigiScan to scan the beam and a Gatan camera to capture the pattern. Data are captured into 3D stacks. These can then be mined to extract various images and to make measurements on the patterns.

Since most cameras are quite slow, (several seconds per frame) acquisition needs to be optimised to make the frame rate as high as possible. Even so, acquisition times can run to many tens of minutes. No data compression is used and so datasets can be very large (GB+). Computers with large amounts of RAM and fast storage are required. If there is insufficient memory on the online PC, data can be acquired as individual frames spooled to disk. These can be assembled into a 3D stack, in a better-resourced offline computer.

System Requirements
Should be compatible with all recent versions of DigitalMicrograph. The beam is scanned using DigiScan - tested on DigiScan II. A fairly recent Gatan camera is required - tested on an Ultrascan and a Rio. Several scripts use circular Hough transform analysis. The CircularHoughTransform dll needs to be installed for these scripts to work - instructions are provided in the manual. This dll is supplied in the Zip archive. If you have already installed the CHT Diffraction Analysis script on the target PC, then this dll will already be present.
Known Issues

The same package of scripts (STEM_Diffraction.gtk) is installed in online (microscope connected) and offline (no microscope connected) instances of DigitalMicrograph. Two scripts (STEM Diffraction and Descan Calibrator) have hardware dependencies. If you attempt to run these scipts on an offline installation then errors will be reported and can be ingored. All the other scripts will work fine.

All development and testing was done using GMS 2.x. There are a couple of minor bugs in GMS 3, which occur when closing some dialogs. These are trivial and can be ignored. I'll fix them in the next release.

Acquisition involves exposing cameras to diffraction patterns. The danger of damaging the camera by high intensity beams is ever present. This software tool is not designed for inexperienced users. It should be used only by experienced microscopists and then only with the approval of the microscope manager. The author accepts no responsibility for any damage or losses arising from the use of this software.

Supported
Yes
Included Files
Zip archive containing a script package, dll and a manual in PDF format.
Source Code

See attached script file.