Scripting Resources for DigitalMicrograph™ |
DigiScan Presets |
|
Function |
A DigiScan capture tool, which provides a range of preset frame sizes/exposures/linesynch/and signal selection options. |
Version |
version:20221219, v1.1 |
Author |
D. R. G. Mitchell |
Acknowledgements |
- |
Comments |
Changing DigiScan settings, such as frame sizes and exposures necessitates opening a sub-dialog from the Gatan DigiScan control panel. Frequent changes to frame sizes are particularly irksome, since both the frame width and height must be manually entered each time. This control panel provides direct access to frame size, pixel dwell time, line synch and Signal 2 settings from the software interface, meaning that they can be either changed directly (no need to open a sub-dialog) or set from a Presets popup menu. The script acquires ADF and BF signals (DigiScan Signals 0 and 1) by default. An option to also acquire Signal 2 via a check box is provided. On my ARM, Signal 2 is an SE signal. Most microscopes will not have this and the option to disable this checkbox is therefore provided. The script uses a single size variable to define the both the image height and width, ie only square images can be acquired. However, I only ever acquire square images. The Gatan DigiScan control panel can be used to acquire non-square images. A checkbox is provided to apply Line Synch. Based on the chosen settings, the actual frame time is displayed. There are seven presets defined, covering common combinations of frame size, dwell time etc. There is an option to save the current settings to the currently selected Preset, enabling customisation. When this script launches it will take the current (Gatan) DigiScan settings as the starting default values. It reads these values from Gatan's Private tags. However, the script does not make any changes to such settings. Even so, you are strongly recommended to routinely (eg every few months) make a backup copy of Gatan preferences - details of how to do this can be found in the script header. Gatan's standard approach to fixing a problematic DigitalMicrograph instance is to reinstall the software then reinstall previously saved settings (prefs). This is quick, simple and very effective. However, it is predicated on having a copy of a good set of undamaged preferences saved. Updated in v1.1 to include a check to see if DigiScan is currently busy when starting an acquisition. If DigiScan is currently acquiring data, such as running a live preview or acquiring a single frame, an alert is put up and the DigiScan Presets acquisition attempt is stopped. |
System Requirements |
Tested on GMS 2 and GMS 3 using a DigiScan II. A DigiScan system must be connected. |
Known Issues |
Two versions of the script are provided in the downloaded zip archive. One version is optimised for GMS 2 and the other for GMS 3. There is no difference in the functionality, only the visual appearance differs. In GMS 3 dialogs are a much darker grey than in GMS 2 and background colours of graphics elements used in the dialog, need to be made darker so that they match the dialog background. Also, there is a bug in GMS 3 dialog scripting whereby the labels in dialog elements which contain spaces can get truncated at the spaces. To overcome this, in the GMS 3 script I have swapped spaces in labels for periods. I find DigiScan scripting to be very brittle, at least on my combination of software/hardware. During script development I get occassional complete crashes of DigitalMicrograph. One such britteness was tracked down to reading the DigiScan rotation setting. To overcome this, I stopped using it and set the rotation to zero. I never use DigiScan rotation anyway, I only use the STEM interface scan rotation. If you use this script and you get a software hangup, the first thing to try is to quit the script and relaunch it. If that fails, restart DigitalMicrograph. If that doesn't work, shut down DigitalMicrograph, then the DigitalMicrograph PC, then power off all the Gatan hardware. Restart in reverse order. This script will not run if DigiScan-specific tags are not present. If you have a newer DigiScan III - these tags may change and you may encounter an error saying DigiScan is not present - when it is. Instructions on how to deal with this are provided in the script header.
|
Supported |
Yes |
Included Files |
Zip archive containing two versions of the same script. One is optimised for GMS 2 and other for GMS 3. |
Source Code |
See attached zip archive. |