AutoEMXSp - Automated Electron Microscopy X-Ray Spectroscopy for Compositional Characterization of Materials
Project description
AutoEMXSp
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 principled filtering and compositional analysis โ all in one click.
๐ฅ Watch AutoEMXSp in action on a desktop SEM-EDS system at https://youtu.be/Bym58gNxlj0
๐งช Test AutoEMXSp to fit and quantify EDS spectra you have collected on your commercial SEM-EDS system (see Tutorials).
๐ This work is described in:
A. Giunto et al., Accurate SEMโEDS Quantification, Automation, and Machine Learning Enable HighโThroughput Compositional Characterization of Powders, 2025.
DOI: https://doi.org/10.21203/rs.3.rs-7837297/v2
โจ Key Features
-
Fully automated SEM-EDS phase-level compositional analysis workflow, which includes:
- Acquisition of EDS spectra, including particle localization if sample is powder. Compatible also with bulk samples, or manual navigation.
- Quantification of compositions using the peak-to-background method
- Rule-based filtering of compositions to discard poorly quantified spectra from the analysis
- Unsupervised machine learningโbased analysis to identify the compositions of individual phases in the sample
-
Scripts for fitting and quantification of single EDS spectra exported by proprietary commercial software (.msa, .emsa, .txt files)
-
Automated experimental standard collection scripts
-
Automated particle size distribution measurements scripts
-
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
๐ Performance
- 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
๐งช Supported Use Cases
- Scanning Electron Microscopy (SEM) with Energy-Dispersive Spectroscopy (EDS)
- Powders and rough samples, e.g. rough films, or pellets, with automated segmentation.
- Bulk, flat samples, navigated by defining a grid of points to probe.
- Manual navigation of any sample.
โ๏ธ Requirements
- Cross-platform: runs on Linux, macOS, and Windows
- Quick installation
- Requires calibration for use with different electron microscopes for maximum compositional accuracy, though EDS quantification can be tested without recalibration.
๐ Table of Contents
- ๐ Documentation
- ๐ฆ Requirements
- ๐ Coming Soon
- ๐ Project Structure
- ๐ Scripts
- ๐ค Contributing
- ๐ License
- ๐ Citation
- ๐ Paper Data
- ๐ฌ Contact
๐ Documentation
Installation instructions, usage examples, and workflow descriptions are available in the AutoEMXSp documentation:
๐ https://cedergrouphub.github.io/AutoEMXSp/
๐ฆ Requirements
- 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.
Electron Microscope Support
- โ 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.
๐ Coming Soon
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.
๐ Project Structure
The repository is organized as follows:
AutoEMXSp/
โโโ autoemxsp/ # Main package source code
โ โโโ _custom_plotting.py # Customizable clustering plot function
โ โโโ config/ # Configuration files, including default values to employ during measurements.
โ โโโ core/ # Core objects and source code
โ โโโ data/ # Libraries of X-ray data
โ โโโ EM_driver/ # Electron Microscope driver (โ ๏ธ adapt to your own instrument)
โ โโโ Results/ # Example acquired data (used for unit tests)
โ โโโ runners/ # Runner functions calling on core objects
โ โโโ scripts/ # Scripts to run acquisition, quantification, etc. (see full list below)
โ โโโ XSp_calibs/ # X-ray spectral calibrations (โ ๏ธ adapt to your own instrument)
โ โโโ utils/ # Utility functions and strings employed by the program
โ
โโโ 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
๐ Scripts
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.
๐ฌ Acquisition, Quantification & 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_AutoEMXSp_Spectrum.py โ Fit and optionally quantify a single spectrum measured with AutoEMXSp. Prints fitting parameters and plots fitted spectrum for detailed inspection of model performance.
- Fit_Quant_Single_MSA_Spectrum.py โ Fit and optionally quantify a single spectrum exported by proprietary software.
๐ Particle Size Distribution Measurements
- Collect_Particle_Statistics.py - Analyse sample, collecting particle size statistics and distribution.
- Process_Particle_Stats_Files.py - Process acquired aprticle size data and recompute.
๐ ๏ธ Miscellaneous
- Run_Experimental_Standard_Collection.py โ Acquire and fit experimental standards.
- Run_SDD_Calibration.py โ Perform calibration of the SDD detector.
โ๏ธ Characterize Extent of Intermixing in Known Powder Mixtures
(see Chem. Mater. 2025, 37, 6807โ6822 for example)
Use the same scripts as regular composition characterization, as described in the docs Tutorial.
๐ All scripts can be executed directly from the command line or imported into a Python environment, making them accessible from anywhere on your system.
๐ค Contributing
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
๐ License
This project is licensed under a NON-COMMERCIAL USE ONLY, LICENSE โ see the LICENSE file for details.
๐ Citation
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; Accurate SEMโEDS Quantification, Automation, and Machine Learning Enable HighโThroughput Compositional Characterization of Powders, 2025.
DOI: https://doi.org/10.21203/rs.3.rs-7837297/v1
BibTeX
@article{Giunto2025AutoEMXSp,
author = {Giunto, Andrea and Fei, Yuxing and Nevatia, Pragnay and Rendy, Bernardus and Szymanski, Nathan and Ceder, Gerbrand},
title = {Accurate SEMโEDS Quantification, Automation, and Machine Learning Enable HighโThroughput Compositional Characterization of Powders},
year = {2025},
doi = {10.21203/rs.3.rs-7837297/v2},
url = {https://doi.org/10.21203/rs.3.rs-7837297/v2}
}
๐ Paper Data
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).
๐ฝ Download with Git LFS
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.
๐ฌ Contact
For questions or issues, please open an issue on GitHub.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autoemxsp-0.1.7.tar.gz.
File metadata
- Download URL: autoemxsp-0.1.7.tar.gz
- Upload date:
- Size: 16.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c73fff0f0ecacc3613937e97f111f3d62e5fe2e7aa3bc080891acab275c4cc5
|
|
| MD5 |
d84395e9e3bb43d2c8bc386f8afb2903
|
|
| BLAKE2b-256 |
d935ef9a7fa151a8a3744ff22ee2603c01e312e1fea2b56fe60b164dd3ae4898
|
File details
Details for the file autoemxsp-0.1.7-py3-none-any.whl.
File metadata
- Download URL: autoemxsp-0.1.7-py3-none-any.whl
- Upload date:
- Size: 16.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
666768e367d6520cad61a6a3a2cde92619d6cec9d3fe3f865806fa18565b9ff9
|
|
| MD5 |
d118d2fd43bc42e817451038ce37189a
|
|
| BLAKE2b-256 |
d4f85cd1364af2874d3d0581e3be09a56b2623c129dc65f52258301bdb356fb4
|