Quantification flags (quant_flag)
Every fitted or quantified spectrum is assigned an integer quant_flag.
The flag records whether AutoEMX considers the result reliable and, if not,
why. Flags are stored on each spectrum’s quantification record (and appear as
Quant_flag in legacy Data.csv outputs).
At analysis time, quant_flags_accepted (in the clustering configuration) decides which of
those flags are kept for compositional clustering. Changing
quant_flags_accepted does not re-run quantification; it only changes
which already-quantified compositions enter the clustering step.
Default for analysis workflows is quant_flags_accepted = [0, -1].
Flag meanings
Flag |
Meaning |
|---|---|
|
Quantification is OK (may still carry large analytical error). |
|
Same as |
|
Error during EDS acquisition / no spectral data. No fit executed. |
|
Total counts below 90% of the target acquisition counts (often bad
segmentation or a truncated acquisition). Fitting is skipped when
|
|
Too little low-energy signal (background under ~2 keV too low), which
compromises P/B ratios. Fitting is skipped when
|
|
Poor fit (reduced chi-squared too high relative to total counts). Fit
may be interrupted when |
|
Excessively high analytical error (> 50 wt%). Often caused by a
missing element or another major model error. Fit may be interrupted
when |
|
Excessive X-ray absorption (particle geometry). Fit may be
interrupted when |
|
Excessive substrate contamination (a substrate-element peak intensity above 10% of total counts). |
|
Background counts under a reference peak are too low (i.e. below |
|
Fit interrupted for an unknown reason. |
|
Experimental-standards measurements only: a required reference peak is missing. |
How to use them
Prefer keeping
[0, -1]for phase identification unless you intentionally want to inspect poorer spectra.To include borderline spectra in clustering, add their flags to
quant_flags_accepted(for example, you may consider including8, which is often quite accurate anyways (see Fig. 4 in the paper)).Prefit issues (
1,2,3) can stop fitting early wheninterrupt_fits_bad_spectra=True. Flags2and3can still be written on a completed quantification if fitting was allowed to proceed.
Related parameters: interrupt_fits_bad_spectra, min_bckgrnd_cnts, and
max_analytical_error_percent. See Tutorial: EDS compositional analysis for phase identification and
Tutorial: Quantify externally exported spectra in batch.