Scripting Resources for DigitalMicrograph™


Dave Mitchell's DigitalMicrograph™ Scripting Website

Home | Scripts | Examples | Functions | Recent Updates | Tutorials | Resources | Publications | Consulting | Projects | Contact & Bio | Private | Search


Import JEOL EMSA into Spectrum
Imports the data from a JEOL EDS EMSA spectrum file into a spectrum.
20150217, v1.0
D. R. G. Mitchell

EMSA spectral files are text files with header information. This script extracts the number of points, dispersion and energy units from the header, then reads the intensity data into a spectrum. Unlike Noran EMSA files which contain a channel number and a data value for each point, JEOL EMSA files have just a data value for each point. Each data line is terminated by a comma. If you are using Noran EMSA files, a separate script called 'Import Noran EMSA into Spectrum' should be used. If you wish to export the EMSA spectral data as a tab-delimited text file for plotting in Excel or any other graphing package, then the script 'EMSA File to Tabbed Text' works nicely on both JEOL and Noran EMSA files.

System Requirements
Tested on GMS 2.3, but should be compatible with GMS 1.x..
Known Issues

EMSA files are a standard - but only in a broad sense. The spectral file consists of a header and then the spectral information, all in text format. The header can contain varying amounts of information and the data can be a single column (data only) as in the JEOL EMSA case, or it can be two column with data and channel number. The net result is that each type of EMSA may require a dedicated script to read the information, but in general, the scripting changes involved are very minor. If you have an EMSA file type with which none of the scripts on this site will work, please contact the author and provide a copy of the file.

Included Files
Single script file.
Source Code

See attached script file.