2nd Derviative

Category: Image Filters
Description: Script to calculate the second derivative of the foremost EELS spectrum (or profile). This script duplicates very closely the DM function of the same name in the EELS menu. It was written to incorporate into scripts using second derivatives. Calling the equivalent DM function from the menu is problematic due to changes in the menu nameing of this function between various versions of DM known issues: Note this script gets the parameters which define the second derivative from the Global Info tags which store the settings made in EELS/Numerical Filters/Preferences. There may be a bug in DM 3.8.2 whereby changes made in the EELS/Numerical Filters/Preferences menu aren't reflected in the Global Info/Tags/EELS Preferences/Numerical Filters/Second derivative etc. You can manually edit the Global Info values, alternatively, run the script with the ALT key held down to change them in the script - you must do this each time you run the script. Note this script does not exactly reproduce the second derivative function in DM and I'm not sure why - answers on a postcard to the address above.
Comments: There is a limitation (or conflict) in User Defined Language with DM script. The operation "/" and "*" cannot be defined as operators in Notepad++ once we define "/*" and "*/" as comment block markers. So I have left "/" and "*" out from the operator list
Acknowledgements: Thanks to Bill Bertram of ANSTO for assistance with the second derivative.
Script version: 1.0
DM/GMS version: 3.8.2
Script written as a function: Yes
Source: Show code
Download Source Code: Download
Download Zip File: Download