Scripting Resources for DigitalMicrograph™ |
Recalibrator |
|
Function |
It is not that uncommon for the magnification calibration lookup table in DigitalMicrograph online systems to get corrupted. This can result in images which have the correct microscope information tags (kV, magnification etc) but the wrong calibration values. It is also possible that some of the values in the original microscope calibration are incorrect - due to an error at the time of calibration. In such a case, the microscope must be recalibrated. However, recalibrating data already captured can be a monumental task - up till now. This script will recalibrate a folder of DM images which have incorrect calibrations, provided the magnfication tag is present. Any problem images encountered, such as EELS spectra (no spatial calibration), will be highlighted by this script. The user can decide whether to inspect such problem images for manual editing or just ignore them. |
Version |
version:2010802, v1.1 |
Author |
D. R. G. Mitchell |
Acknowledgements |
Thanks to Jacques O'Connell of NMMU for testing and improving this script. |
Comments |
Updated in v1.1 to correct a minor dialog error. It now also requires that all currently open images are closed before opening the target folder. There are three sets of parameters in this script which the user must edit before running it. 1. The magnfication lookup table at the start of the script must be edited, so that the values match those of the microscope/camera in question. The lookup table uses microscope magnification and the calibration factor in measurement units per pixel. For a given magnification, this value can be sourced from a correctly calibrated image by right clicking on it, selecting Image Display and then selecting the Calibration tab. 2. The number of camera pixels in x and y must be set. 3. The calibration units - usually Ã… or nm. Once these have been set, the script can be installed in a menu and used as necessary. |
System Requirements |
Tested on GMS 2. Should be compatible with all versions. |
Known Issues |
This script can deal with the situation where the calibration lookup table has become corrupted, but communication between DigitalMicrograph and the microscope is still functioning. In this case the scale bar on the image may be incorrect, but the Microscope Info tags on the image (right click on the image and select Image Display/Tags/Microscope Info) are present and correct - specifically the microscope magnification. In situations where communication with the microscope is lost, then no microscpe info tags will be present and this script will not work. In fact, if you have not recorded the magnificaiton at which the image was recorded - either in a log book or in the file name, then such images can not be calibrated. This script assumes that the spatial calibration is the same in x and y. |
Supported |
Yes |
Included Files |
Main script file. |
Source Code |
see attached script
|