Skip to content

weber1158/netIntensity.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

netIntensity.py - A Jython Script for DTSA-II

πŸ“ About

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:

  1. Open DTSA-II
  2. Import one or more EDS spectral data files (.msa or .emsa extension)
  3. 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.
  4. Click the Open button and navigate to the netIntensity.py file. Select the file and it should run automatically.

🚫 Limitations

  • 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.py will 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 the peakIntegral command for each element individually and for each spectrum individually.
  • netIntensity.py always 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.

πŸŽ“ How to cite

APA-like

Weber, A. M. (2025). netIntensity.py (Version 0.1) [Software]. GitHub. https://github.com/weber1158/netIntensity.py

BibTex

@misc{weberNetIntensity2025,
    author = {Austin M. Weber},
    title = {{netIntensity.py} ({Version} 0.1) [{Software}]},
    year = {2025},
    url = {https://github.com/weber1158/netIntensity.py}
}

About

Jython script [DTSA-II] for bulk evaluation of elemental net intensities in x-ray energy spectra

Resources

License

Stars

Watchers

Forks

Contributors

Languages