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 Calibrator
Function
Calibrates scanned images such as non-Gatan STEM or SEM images, where a single calibration factor (as a function of magnification) is needed.
Version
version:20141017, v1.0
Author
D. R. G. Mitchell
Acknowledgements

Thanks to Assoc. Prof. Jenny Wong-Leung for testing this script.

Comments
Life is easy when STEM images are captured directly into DigitalMicrograph. However, where other interfaces are used, eg JEOL Microanalysis Station or JEOL's TEMCON interface, then images in other formats are obtained (TIFF and JEOL RAW DATA formats respectively). It is useful to be able to read these images into DM for calibration/measurement/analysis. TIFF files can be read in directly. However, JEOL RAW DATA (.jrd) cannot be opened directly. This format is actually a bitmap format (.bmp), so after changing the .jrd extension to .bmp, the files can be opened by DM (File/Open). This script will apply a calibration to the opened image - the only thing it requires is the magnification. The calibration factor for the particular scanning instrument must be obtained by either capturing an image with a scale bar built-in or imaging a feature of known dimension. This script contains extensive notes which explain how to read in .jrd files and how to do the calibration. This script can calibrate images from any type of scanning instrument - so SEM, AFM etc can also be used, provided the images are captured in a generic format which DM can read (TIFF, BMP etc). Avoid JPEG if possible, as it introduces compression artefacts.
System Requirements
Should be compatible with all versions of GMS.
Known Issues
The script contains a default calibration value. This will not be correct for your microscope. Read the notes in the script and determine the calibration factor for your instrument.
Supported
Yes.
Included Files
Main script file.
Source Code
Attached.