Release Notes
The eds-classification repository is transitioning from the v1.x series to the v2.x series. The changes to the repository are significant and will be incompatible with scripts written using functions from the previous release series.
Please see the release notes for Major Changes below.
Major Changes
Repository Structure
In the previous release series, all code files were stored in 📁/main/MATLAB/. The organization of the older repository was in need of upgrading to match modern software standards. The v2.x series divides the repository contents into distinct subfolders within /main/, which does a much better job at organization. For example, /main/ now includes:
- 📁
/data/: A separate folder for data files. - 📁
/demo/: A separate folder for the demo script. - 📁
/docs: A separate folder for the documentation. - 📁
/machine_learning_models/: A separate folder for housing files related to model training. - 📁
/src/: A separate folder for the main repository functions; that is, the functions designed specifically for the user. - 📁
/tests/: A separate folder containing test files for the main repository functions. - 📁
/utils/: A separate folder for utility functions that work in the backend of the main repository functions.
Depreciated Functions
Several functions have been depreciated in this release thanks to advancements in the latest available functions. The following functions have been removed, and their corresponding replacement functions are labeled where applicable:
- ❌
add_xray_plot, ❌clear_xray_labels, ❌xray_peak_label, and ❌xray_plothave been replaced by the new custom MATLAB class ✅Spectrumwhich contains methods for performing all of the depreciated tasks. - ❌
read_msahas been replaced by the new custom MATLAB class ✅eds_readwhich reads and saves both metadata and numeric data automatically and includes a method for quick visualization (although, theSpectrumplotting method should be considered the primary method for visualizing x-ray energy data). - ❌
sem_pixel_sizehas not been removed because similar information can be obtained with theget_sem_metadatafunction, which was already available. Theget_sem_metadatafunction has not been depreciated. - ❌
convergence_anglehas been removed because it does not really belong in the repository (it has little to do with either plotting x-ray energy spectra or identifying mineral particles).
New Functions
v2 introduces several new functions that greatly improve the usability of the eds-classification repository:
Main functions in /src/
- ✅
Spectrum: A custom MATLAB class for plotting x-ray energy spectra. Contains methods for overlaying additional spectra and adding labels to the characteristic x-ray peaks. - ✅
eds_read: A custom MATLAB class for reading EDS spectral files (.msa / .emsa). Tested on EDS spectra collected with 5 different SEMs across various labs and institutions. Also contains a method for plotting a quick visualization of the EDS spectrum, but theSpectrumclass is the preferred method for visualization. - ✅
msa_classification: A sister function toeds_classificationthat can reads and interprets mineralogy directly from .msa / .emsa files. Uses custom backend algorithms such assubtract_background,net_intensity, andatom_percentto convert the data contained in a spectral data file into the best format possible for mineral classification. Optional inputs make this function adjustable where needed. - ✅
stoich_quantand ✅standard_stoich_quant: Provide users with the ability to estimate the stoichiometric coefficients of mineral formulae using normalized weight percent and/or net intensity data obtained from EDS. Usestoich_quantfor standardless quantification andstandard_stoich_quantwhen you have data for a reference mineral that can be used to constrain the stoichiometric quantification. I would like to thank Julie Sheets for giving me the general idea for how to implement these new algorithms.
Utility functions in /utils/
- ✅
atom_percent: Assuming that the intensity of each characteristic x-ray is proportional to the elements' atomic weights, this function converts net intensity data into atomic percentages. - ✅
net_intensity: An improved version ofpeak_intensitysuch that characteristic x-ray peaks are integrated using trapezoidal summation rather than simply taking the maximum number of counts at the apex of the peak.
Updated Functions
In addition to new functions, some functions have received significant updates. For instance:
- ✅
eds_classification: The output data type has been changed fromcategoricaltostructin order to accommodate for differences in the outputs of the various mineral classification algorithms. Additionally, all mineral classification algorithms now default to using full mineral names rather than abbreviations. - ✅
subtract_background: This helper function is now found in the 📁/utils/folder. While primarily used in the backend ofmsa_classification, thesubtract_backgroundalgorithm includes an optional plotting argument. In the latest release, specifying the plotting argument generates an improved visualization of the background subtraction compared to previous versions.
New Test Files
The 📁/tests/ folder contains new MATLAB test class files for each of the main functions found in 📁/src/. Each of these test files is passing as 02 August 2026. You can run the tests in MATLAB by opening 📁/tests/ as the current folder, selecting each or all files, right-clicking the selected file(s) with your computer mouse, and then clicking the Run Tests button.