Measure EELS Peak Intensities

Category: Data Processing and Evaluation – Spectra
Author:
Description: Script to calculate the second derivative of an EELS spectrum and from that, the positive component. This positive component is then analysed to determine the presence and location of peaks. The energy of these peaks and their integral is then calcuated and displayed. Use this script for measuring the ratio of white lines for valency determination. Earlier versions of this script called the built-in second derivative function from the EELS/Numerical filters menu. However, Gatan changed the naming of this function between DM3.7 and 3.8 and again in 3.9 causing problems with the script.So the second derivative function was recreated and built into this script to make it fully self-contained. Version 2.2 of this scriipt ran fine with DM 3.8.2 and 3.9 (I think). However, upon upgrading to DM 3.11 it would no longer work. This is because the Global Info tags which stored the default settings of the second derivative filter were changed, and the old script couldn't pick them up. This new version uses script-based default values for the second derivative which the user is prompted with and can change if the ALT key is held down. The reason for this is that setting the second derivative preferences for the DM Numerical Filters does not change the Global Info tags - whether by bug or by design. So it is better to make the values used more accessible and transparent. The default values for the second derivative filters are called mainwidth and wingwidth are appear at the the start of the function called secondderivative. Another change introduced in DM 3.11 (or thereabouts) is that line plots are only recognised as EELS spectra if they have the appropriate Spectrometer Info tags attached. Without these, it is not possible to calibrate an EELS spectrum. Any line plot can be converted into an EELS spectrum by running the Spectrum/Convert Data to . . /EELS function - which is new to the most recent versions of DM. Users of older versions of DM will not have to do this extra step.
Comments: Earlier versions of this script called the built-in second derivative function from the EELS/Numerical filters menu. However, Gatan changed the naming of this function between DM3.7 and 3.8 and again in 3.9(?) causing problems with the script. The second derivative function was recreated and built into this script to make it fully self-contained. Note the parameters of the second derivative are set in the usual way, through EELS - NumericalFilters - Preferences. This script picks up those settings. HOWEVER, there may be a bug in version 3.8.2 of DM which means this doesn't work, changing the values in the Numerical Filters preferences does not update the tags.To overcome this you can either manually edit the relevant tags (Global Info/tags/EELS Preferences/Numerical Filters/Current Preferences/ Second Deerivative width etc to the values you want to use. For one off measurements run the script with the ALT key held down and a prompt to set these values is given.! Do this at each measurement where you want values different to those shown in the Global Info tags. V2.1 is a complete rewrite to greatly improve speed and functionality.
Acknowledgements: Thanks to Bill Bertram of ANSTO for advice on the second derivative function, and to B. Schaffer for some useful ideas on improving this script - which I have completely rewriten. Thanks to B. Schaffer for tips on using text windows for outputing data to (instead of the Results window).
Script version: 2.1
DM/GMS version: 3,11,0
Script written as a function: No
Source: Show code
Download Source Code: Download
Download Zip File: Download