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

 

Function: Read Bruker EDS Spectrum text file
Function
A function which will read in a Bruker EDS spectrum file which has been exported in text format.
Version
version:20230304, 1.2
Author
D. R. G. Mitchell
Acknowledgements
Thanks to Joana Polednia for testing this script.
Comments

Simply point at the saved text file and it is read into a spectrum. To export Bruker EDS spectral data from Esprit into MSA format requires an additional Esprit plugin, but the text format option comes as standard with that software.

Updated in v1.2: A user reported that this script no longer worked with text files exported from the most recent version of Esprit (v1.9). It turned out that in text files exported from this version an extra space had been inserted between Energy and Counts in the last line of the header (before the data part of the file begins). This function has been modified so that it will work with both the latest version and the previous version.

System Requirements
Tested on GMS 2.x, but should be compatible all recent versions.
Known Issues
-
Supported
Yes
Included Files
Main script file.
Source Code

See the attached script