autoemx.core.composition_analysis.clustering module

Clustering mixin for EMXSp composition analysis.

autoemx.core.composition_analysis.clustering.quantification_min_bckgrnd_cnts(analyzer: Any) → float | None[source]

min_bckgrnd_cnts used when the active quantification run was quantified (its first clustering analysis).

autoemx.core.composition_analysis.clustering.effective_quant_flag(record: Any, analyzer: Any) → Tuple[int | None, str | None][source]

quant_flag and comment of a quantification result for the min_bckgrnd_cnts of the analysis.

quant_flag 8 (background counts under the reference peaks too low) is assigned during quantification with the min_bckgrnd_cnts in use then. If the analysis uses another value, it is re-evaluated from the background counts stored with the result (no re-quantification): only between 0/-1 and 8, since other flags take precedence. Results without the stored background counts (older AutoEMX versions) keep their flag.

autoemx.core.composition_analysis.clustering.count_results_without_bckgrnd_cnts(analyzer: Any) → int[source]

Number of results to which a changed min_bckgrnd_cnts cannot be applied (no stored background counts).

class autoemx.core.composition_analysis.clustering.ClusteringModule[source]

Bases: object

TRACE_MEDIAN_FACTOR = 2
SINGLE_CLUSTER_RMS_THRESHOLD = 0.03
DEFAULT_TOTAL_SCATTER_CAP = 0.1