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

 

Drift Tube Scanning
Function
Scans the GIF drift tube voltage to and fro as a background thread.
Version
version:20171026, v1.0
Author
D. R. G. Mitchell
Acknowledgements

Based on an original script by Vincent Hou.

Comments

Script to scan the drift tube voltage of a GIF, using a background thread. The current setting of the drift tube is sourced and the value is then changed in increments of Step Size, to a maximum voltage change specified by the Voltage Amplitude value. Each voltage change is held for the time specified by the Dwell per Step value. Once the voltage amplitude is reached, the voltage is then stepped back to the original voltage in a similar manner. The process is then repeated. This creates a sawtooth variation in the drift tube voltage. Based on the settings chosen above, the time to cycle to the maximum offset and back again is displayed in the Cycle Time field.

For a unidirectional ramp, choose a large enough voltage amplitude and a long enough dwell per step, to ensure that the drift tube voltage spans no more than half a cycle during your experiment. This script runs in background and so can be left running while doing such things as acquiring STEM-EELS spectrum images (provided that such prodcedures do not change the Drift Tube).

This script is useful in averaging out pixel to pixel variations which can arise due to imperfect CCD gain corrections. Obviously the spectra acquired with drift tube ramping will have offsets. However, these can be removed by using energy drift correction - either using Gatan's own spectrum imaging tools, or those provided in the SITools suite of software.

 

System Requirements

This script should be compatible with all recent versions of DigitalMicrograph. This has been tested on a 963 GIF Quantum, using GMS 2.3.2. Most current spectrometers and GIFs should be compatible with this script.

Known Issues

Inevitably spectral acquisitions will occur while the drift tube voltage is changing, since there is no synchonisation between this script and the Gatan acquisition routine. Provided the drift tube voltage step size is the same as the dispersion, and provided the dwell time for each drift tube change is significantly longer than the acquisition time per spectrum, then this smearing effect will be negligible. I have used this script to acquire spectrum images where I acquired 8 spectral points during each dwell at a particular drift tube voltage and the total voltage sweep was around 12eV. After energy drift correction, the energy resolution averaged over the whole SI was 0.5eV, which was identical to that measured using static conditions at the start of the experiment.

For low loss work, the very intense ZLP may affect the response of the CCD. For this reason, this script is designed to begin the voltage scan such that it drives the spectrum to the right. Once it reaches its maximum voltage offset, it then moves the spectrum leftwards, back to the original voltage. Typically, I acquire my data (in low loss work), only during the first half of the cycle when the ZLP is moving to the right. This ensures that the region of CCD affected by the intense ZLP is kept away from the low intensity region of the low loss spectrum (1-5eV). If the full cycle is used, then as the ZLP moves back to the left, the spectral region immediately to the right of the ZLP will show a dip in intensity, due to it sitting on the region of the CCD recently irradiated by the ZLP.

This script is provided in good faith, but with no warranty as to its fitness for purpose. Users of this script do so entirely at their own risk. The author accepts no responsbility for any losses or damage which may arise from its use.

Supported
Yes
Included Files
Main script
Source Code

see attached script