DTSA-II is a GUI developed by NIST for analyzing x-ray spectra. The GUI is equipped with a command prompt that uses an implementation of Python 2 in Java (Jython) for scripting purposes.
netIntensity.py is a script written for DTSA-II that can bulk processes multiple spectra at a time and print the net intensities for the following mineral-forming elements: F, Na, Mg, Al, Si, P, S, Cl, K, Ca, Ti, Cr, Mn, and Fe.
π How to use (Download Instructions)
You can run netIntensity.py on your computer by downloading the script and doing the following:
- Open DTSA-II
- Import one or more EDS spectral data files (.msa or .emsa extension)
- In the Command tab, type
ls()and then execute the command with CTRL+Enter- This will print a table of all the loaded spectra. The table will have two columns: Name and Spectrum. The values in the Name column will be "s1", "s2", "s3", etc.
- Click the Open button and navigate to the
netIntensity.pyfile. Select the file and it should run automatically.
- Jython uses the depreciated Python 2 language, so be warned that if you want to make modifications to the script you will most likely need to consult some very old resources.
- Running
netIntensity.pywill print the results in the DTSA-II command window, but the results are not automatically saved as a delimited file. You will need to copy-paste the printed results into a spreadsheet and adjust the columns as needed, but this method is still significantly faster than manually typing thepeakIntegralcommand for each element individually and for each spectrum individually. netIntensity.pyalways integrates the peaks for F, Na, Mg, Al, Si, P, S, Cl, K, Ca, Ti, Cr, Mn, and Fe. Therefore, the resulting net intensity for an element may be negative if the element itself is not present as a major peak in the spectrum. Unfortunately, you will need to manually set these values to zero whenever you transfer the results to a delimited spreadsheet file.
APA-like
Weber, A. M. (2025). netIntensity.py (Version 0.1) [Software]. GitHub. https://github.com/weber1158/netIntensity.pyBibTex
@misc{weberNetIntensity2025,
author = {Austin M. Weber},
title = {{netIntensity.py} ({Version} 0.1) [{Software}]},
year = {2025},
url = {https://github.com/weber1158/netIntensity.py}
}