Automated Electron Microscopy X-Ray Spectroscopy for Compositional Characterization of Materials
AutoEMXSp is a fully automated framework for SEM-EDS workflows β from spectral acquisition and quantification to data filtering and compositional analysis β all in one click.
π₯ Watch AutoEMXSp in action on a desktop SEM-EDS system at https://youtu.be/Bym58gNxlj0
π This work is described in:
A. Giunto et al., Harnessing Automated SEM-EDS and Machine Learning to Unlock High-Throughput Compositional Characterization of Powder Materials, 2025.
DOI: https://doi.org/10.21203/rs.3.rs-7837297/v1
- Automated acquisition & quantification of X-ray spectra using the peak-to-background method. Single spectrum quantification also available
- Automated rule-based filtering of compositions to discard poorly quantified spectra from the analysis
- Automated machine learningβbased compositional analysis to identify the compositions of individual phases in the sample
- Automated experimental standard collection scripts included
- Extensible architecture β adaptable to other techniques such as
- Wavelength Dispersive Spectroscopy (WDS)
- Scanning Transmission Electron Microscopy (STEM) with EDS
- Extensible hardware support β includes driver for ThermoFisher Phenom Desktop SEM series, and can be extended to any electron microscope with a Python API
- Benchmarked on 74 single-phase samples with compositions spanning 38 elements (from nitrogen to bismuth), it achieved <5β10% relative deviation from expected values
- Machine learning compositional analysis detects individual phase composition in multi-phase samples, including minor phases
- Intermixed phases can also be resolved
- Powders and rough samples, e.g. rough films, or pellets.
- Scanning Electron Microscopy (SEM) with Energy-Dispersive Spectroscopy (EDS)
- Cross-platform: runs on Linux, macOS, and Windows
- Quick installation
- Requires calibration for use with different electron microscopes
- π Documentation
- π¦ Requirements
- π Coming Soon
- π Project Structure
- π Scripts
- π€ Contributing
- π License
- π Citation
- π Paper Data
- π¬ Contact
Installation instructions, usage examples, and workflow descriptions are available in the AutoEMXSp documentation:
π https://cedergrouphub.github.io/AutoEMXSp/
- Python 3.11 or newer
- All dependencies are installed automatically via
piporconda. - Tested versions of dependencies are specified in
pyproject.toml.The package may work with more recent versions, but these have not been tested.
- β Developed and tested for Thermo Fisher Phenom Desktop SEMs.
- β Compatible with any Phenom microscope equipped with PPI (Phenom Programming Interface).
β οΈ For other microscope models, the driver must be adapted to the appropriate API commands.
Hereβs whatβs planned for future releases of AutoEMXSp:
- π Verify with the latest Python version for improved compatibility with current scientific libraries
- π New scripts for spectral parameter calibration to extend the
XSp_calibslibrary to your own instrument.
The repository is organized as follows:
AutoEMXSp/
βββ autoemxsp/ # Main package source code
β βββ core/ # Core objects and source code
β βββ runners/ # Runner functions calling on core objects
β βββ data/ # Libraries of X-ray data
β βββ _custom_plotting.py # Customizable clustering plot function
β βββ EM_driver/ # Electron Microscope driver (β οΈ adapt to your own instrument)
β βββ XSp_calibs/ # X-ray spectral calibrations (β οΈ adapt to your own instrument)
β βββ scripts/ # Scripts to run acquisition, quantification, etc. (see full list below)
β βββ Results/ # Example acquired data (used for unit tests)
β
βββ examples/ # Example scripts for fitting, quantification and compositional analysis of example data
βββ tests/ # Unit tests for fitting, quantification, compositional analysis and image processing
β # (Acquisition tests require proper EM drivers)
βββ paper_data/ # Raw paper data uploaded on Git LFS (Dowload instructions in Paper Data section below)
β
βββ LICENSE.txt
βββ README.md
βββ pyproject.toml
This repository includes a collection of scripts that streamline the use of AutoEMXSp.
Each script is tailored for a specific task in spectral acquisition, calibration, quantification, or analysis.
- Run_Acquisition_Quant_Analysis.py β Acquire X-ray spectra and optionally perform quantification and composition analysis.
- Run_Quantification_Analysis.py β Quantify acquired spectra (single or multiple samples) and perform machine-learning analysis.
- Run_Analysis.py β Launch customized machine-learning analysis on previously quantified data.
- Fit_Quant_Single_Spectrum.py β Fit and optionally quantify a single spectrum. Prints fitting parameters and plots fitted spectrum for detailed inspection of model performance.
- Collect_Particle_Statistics.py - Analyse sample, collecting particle size statistics and distribution.
- Process_Particle_Stats_Files.py - Process acquired aprticle size data and recompute.
- Run_Experimental_Standard_Collection.py β Acquire and fit experimental standards.
- Run_SDD_Calibration.py β Perform calibration of the SDD detector.
(see Chem. Mater. 2025, 37, 6807β6822 for example)
- Run_Acquisition_PrecursorMix.py β Acquire spectra for powder precursor mixtures.
- Run_Quantification_PrecursorMix.py β Quantify spectra for one or multiple powder mixtures and run machine-learning analysis.
- Customized analysis can be performed using the Run_Analysis.py script
π All scripts can be executed directly from the command line or imported into a Python environment, making them accessible from anywhere on your system.
Contributions are welcome!
Open to collaborations to extend this package to different tools or to different types of samples, for example thin films. Please contact me at agiunto@lbl.gov
This project is licensed under a NON-COMMERCIAL USE ONLY, LICENSE β see the LICENSE file for details.
If you use AutoEMXSp in your research, please cite the following publication:
A. Giunto, Y. Fei, P. Nevatia, B. Rendy, N. Szymanski and G. Ceder; Harnessing Automated SEM-EDS and Machine Learning to Unlock High-Throughput Compositional Characterization of Powder Materials, 2025.
DOI: https://doi.org/10.21203/rs.3.rs-7837297/v1
@article{Giunto2025AutoEMXSp,
author = {Giunto, Andrea and Fei, Yuxing and Nevatia, Pragnay and Rendy, Bernardus and Szymanski, Nathan and Ceder, Gerbrand},
title = {Harnessing Automated SEM-EDS and Machine Learning to Unlock High-Throughput Compositional Characterization of Powder Materials},
year = {2025},
doi = {10.21203/rs.3.rs-7837297/v1},
url = {https://doi.org/10.21203/rs.3.rs-7837297/v1}
}The raw data used in the associated publication is stored in the paper_data/ directory.
These files are tracked with Git LFS (Large File Storage).
The repository is automatically cloned without Git LFS; you will only see placeholder files instead of the actual datasets inside paper_data/.
To download the full data, on the terminal go to the repo directory and:
# 1. Install Git LFS (only needed once per machine)
git lfs install
# 2. Fetch the data files
git lfs fetch --all
git lfs checkout
Alternatively, download manually from the github repo Download button.
After downloading, run the Run_Analysis.py or Run_Quantification.py scripts within the folder.
For questions or issues, please open an issue on GitHub.