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

 

Batch Export Spectra as Tabbed Text
Function

Exports either the front-most or all the currently displayed 1D profiles (intensity profiles, EELS spectra etc) as tabbed text, saving each file to disk.

Version
version:20181228, v3.4
Author
D. R. G. Mitchell
Acknowledgements
-
Comments

Update in v3.4. Fixed a problem where only the base slice exported from an image containing overlaid spectra would be calibrated.

At least one 1D profile must be displayed. The data are in two columns: x and y. These can then be imported into Excel or other plotting/analysis packages. X axis values can be exported in either calibrated units (eg nm, eV etc) or as pixel values. Any 2D or 3D images open at the same time are ignored.

Where overlaid spectra are present, they are saved with the parent file name followed by the slice name.

System Requirements
Should be compatible with all GMS versions.
Known Issues
The extension of the saved files is .s, which is a DM script file. This is just plain text, so anything will open it.
Supported
Yes
Included Files
Main script file.
Source Code

See attached script.