autoemx.config.runtime_configs module

AutoEMX configuration dataclasses.

Created on Mon Jul 28 10:33:35 2025

@author: Andrea

This module provides configuration dataclasses for all stages of an automated X-ray spectroscopy workflow, including microscope setup, sample and substrate definition, measurement and acquisition settings, spectrum fitting, quantification and filtering, powder measurement, and plotting.

Configurations:

  • MicroscopeConfig: Settings for microscope hardware, calibration, and imaging parameters.

  • SampleConfig: Defines the sample’s composition/type and spatial properties.

  • SampleSubstrateConfig: Specifies the substrate composition and geometry supporting the sample.

  • MeasurementConfig: Controls measurement type, beam parameters, and acquisition settings.

  • QuantificationOptionsConfig: Runtime options for spectral fitting and quantification.

  • PowderMeasurementConfig: Settings for analyzing powder samples and particle selection.

  • BulkMeasurementConfig: Settings for analyzing non-powder samples.

  • PlotConfig: Options for saving, displaying, and customizing plots.

Each dataclass includes attribute documentation and input validation.

class autoemx.config.runtime_configs.MicroscopeConfig(*, ID: str = 'PhenomXL', type: str = 'SEM', detector_type: str = 'BSD', is_auto_BC: bool = True, brightness: float | None = None, contrast: float | None = None, energy_zero: float | None = None, bin_width: float | None = None)[source]

Bases: BaseModel

Configuration for the microscope hardware.

Variables:
  • ID (str) – Identifier for the microscope, defining instrument calibrations at autoemx/calibrations/ID.

  • type (str) – Type of microscope. Allowed: ‘SEM’ (implemented), ‘STEM’ (not implemented).

  • is_auto_BC (bool) – If True, brightness/contrast are set automatically.

  • brightness (Optional[float]) – Manual brightness value; required if is_auto_BC is False.

  • contrast (Optional[float]) – Manual contrast value; required if is_auto_BC is False.

  • energy_zero (Optional[float]) – Set from detector calibration files during spectral collection.

  • bin_width (Optional[float]) – Set from detector calibration files during spectral collection.

Notes

  • If is_auto_BC is False, both brightness and contrast must be provided.

  • STEM mode is not implemented and will raise NotImplementedError.

  • The microscope ID must correspond to a folder at autoemx/calibrations/ID containing all necessary calibration files.

ID: str
type: str
detector_type: str
is_auto_BC: bool
brightness: float | None
contrast: float | None
energy_zero: float | None
bin_width: float | None
ALLOWED_TYPES: ClassVar[Tuple[str, ...]] = ('SEM', 'STEM')
ALLOWED_DETECTOR_TYPES: ClassVar[Tuple[str, ...]] = ('BSD',)
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class autoemx.config.runtime_configs.SampleConfig(*, elements: List[str], type: str = 'powder', w_frs: Dict[str, float] | None = None, center_pos: Tuple[float, float] = (0.0, 0.0), half_width_mm: float = 2.9, is_powder_sample: bool = False, is_surface_rough: bool = False, is_grid_acquisition: bool = False, is_particle_acquisition: bool = False)[source]

Bases: BaseModel

Configuration for the sample.

Variables:
  • elements (List[str]) – List of elemental symbols (e.g., [‘Fe’, ‘O’]).

  • type (str) –

    Sample type. Allowed types:

    • powder: Expects particles, and uses geometrical correction factors during spectral fits.

    • powder_continuous: Expects a quasi-continuous powder mixture, sampled in a grid (NO PARTICLE DETECTION APPLIED). Applies geometrical correction factors during spectral fits.

    • bulk: Expects a flat, continuous surface, sampled in a grid. Does not apply geometrical factors.

    • bulk_rough: Expects a continuous surface, sampled in a grid. Applies geometrical factors.

    • film: NOT IMPLEMENTED YET

  • w_frs (Dict[str,float]) – Known elemental mass fractions, kept fixed during fits (e.g., {‘Fe’: 0.4, ‘O’: 0.6}). Set automatically for experimental standards from their formula (ExpStandardsConfig.formula_w_frs).

  • center_pos (Tuple[float, float]) – (x, y) center position of the sample on the stage, in mm.

  • half_width_mm (float) – Half-width of the sample in millimeters.

Notes

  • Only ‘powder’ and ‘bulk’ type are implemented. ‘film’ will raise NotImplementedError.

  • Element symbols are validated. An error is raised if any symbol is unrecognized.

elements: List[str]
type: str
w_frs: Dict[str, float] | None
center_pos: Tuple[float, float]
half_width_mm: float
ALLOWED_TYPES: ClassVar[Tuple[str, ...]] = ('powder', 'powder_continuous', 'bulk', 'bulk_rough', 'film')
POWDER_SAMPLES_TYPES: ClassVar[List[str]] = ['powder', 'powder_continuous']
is_powder_sample: bool
ROUGH_SURFACE_TYPES: ClassVar[List[str]] = ['powder', 'powder_continuous', 'bulk_rough']
is_surface_rough: bool
GRID_ACQUISITION_TYPES: ClassVar[Tuple[str, ...]] = ('bulk', 'powder_continuous', 'bulk_rough', 'film')
is_grid_acquisition: bool
PARTICLE_ACQUISITION_TYPES: ClassVar[str] = 'powder'
is_particle_acquisition: bool
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class autoemx.config.runtime_configs.SampleSubstrateConfig(*, elements: List[str] = <factory>, type: str = 'Ctape', shape: str = 'circle', auto_detection: bool = True, stub_w_mm: float = 12)[source]

Bases: BaseModel

Configuration for the sample substrate.

Variables:
  • elements (List[str]) – List of element symbols present in the sample substrate.

  • type (str) – Type of the sample substrate. Allowed values: ‘Ctape’.

  • shape (str) – Shape of the sample substrate. Allowed values: ‘circle’, ‘rectangle’.

  • auto_detection (bool) – Whether to attempt automatic detection of substrate. (implemented only for type = Ctape & shape = ‘circle’)

  • stub_w_mm (float) – Lateral dimension of substrate holder in mm, used for determining image size for auto_detection.

Notes

  • Element symbols are validated. An error is raised if any symbol is unrecognized.

elements: List[str]
type: str
shape: str
auto_detection: bool
stub_w_mm: float
ALLOWED_TYPES: ClassVar[Tuple[str, ...]] = ('Ctape', 'None')
ALLOWED_SHAPES: ClassVar[Tuple[str, ...]] = ('circle', 'square')
ALLOWED_AUTO_DETECTION_TYPES: ClassVar[str] = 'Ctape'
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class autoemx.config.runtime_configs.MeasurementConfig(**data: Any)[source]

Bases: BaseModel

Configuration for the measurement/acquisition session.

Variables:
  • type (str) – Measurement type. Allowed: ‘EDS’ (implemented), ‘WDS’ (not implemented).

  • mode (str) – Measurement mode (e.g., ‘point’). Defines set of measurement parameters (i.e., beam current), determining detector calibration parameters

  • working_distance (Optional[float]) – Working distance to use for current measurement, in mm. Takes it from EM_driver if left unspecified.

  • working_distance_tolerance (Optional[float]) – Defines maximum accepted deviation of working distance from its typical value, in mm. Used to prevent gross mistakes from EM autofocus. Default: 1 mm.

  • beam_energy_keV (float) – Electron beam energy in keV.

  • beam_current (Optional[float]) – Beam current; must be provided at initialization or via detector channel calibration file.

  • emergence_angle (Optional[float]) – Emergence angle; updated from microscope driver file if not provided.

  • is_manual_navigation (bool) – If True, instrument navigation is performed manually.

  • max_acquisition_time (float) – Maximum X-ray spectral acquisition time in seconds.

  • target_acquisition_counts (int) – Target number of counts for acquisition of X-ray spectrum.

  • min_n_spectra (int) – Minimum number of spectra to acquire.

  • max_n_spectra (int) – Maximum number of spectra to acquire.

  • powder_meas_cfg (Optional[PowderMeasurementConfig]) – Powder acquisition settings.

  • bulk_meas_cfg (Optional[BulkMeasurementConfig]) – Bulk/grid acquisition settings.

  • exp_stds_cfg (Optional[ExpStandardsConfig]) – Experimental standards settings.

  • saved_images_extension (str) – Extension used when saving SEM frame images.

  • save_raw_images (bool) – Whether to also save the non-annotated version of annotated SEM images (when annotate_particle_images is True).

  • annotate_particle_images (bool) – Whether to annotate the images saved during acquisition: spectrum spots (dot + spectrum ID) on particle images, particles found (circle + particle number) on frame images, and a scale bar. If False (default), raw images are saved; annotated copies can be made afterwards with Annotate_Particle_Images.py, from the positions stored in the ledger.

type: str
mode: str
working_distance: float | None
working_distance_tolerance: float
beam_energy_keV: float
beam_current: float | None
emergence_angle: float | None
is_manual_navigation: bool
max_acquisition_time: float
target_acquisition_counts: int
min_n_spectra: int
max_n_spectra: int
powder_meas_cfg: PowderMeasurementConfig | None
bulk_meas_cfg: BulkMeasurementConfig | None
exp_stds_cfg: ExpStandardsConfig | None
saved_images_extension: str
save_raw_images: bool
annotate_particle_images: bool
ALLOWED_IMAGE_EXTENSIONS: ClassVar[Tuple[str, ...]] = ('tif', 'tiff', 'png', 'jpg', 'jpeg', 'webp', 'bmp')
PARTICLE_STATS_MEAS_TYPE_KEY: ClassVar[str] = 'particle_stats'
ALLOWED_TYPES: ClassVar[Tuple[str, ...]] = ('EDS', 'WDS', 'particle_stats')
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class autoemx.config.runtime_configs.QuantificationOptionsConfig(*, method: str = 'PB', spectrum_lims: Tuple[float, float]=(14, 1100), fit_tolerance: float = 0.0001, use_instrument_background: bool = False, use_project_specific_std_dict: bool = False, min_total_counts_fraction: float = 0.9, is_known_phase_mixture: bool = False, identify_missing_elements: bool = True, identification_seed_spectra: int = 10, identification_z_range: Tuple[int, int]=(5, 83), identification_excluded_elements: List[str] = <factory>)[source]

Bases: BaseModel

Configuration for X-ray spectrum fitting and quantification.

Variables:
  • method (str) – Method to use for quantification. Currently only accepts ‘PB’

  • spectrum_lims (Tuple[float, float]) – Lower and upper spectral index limits.

  • fit_tolerance (float) – lmfit tolerance for fit convergence

  • use_instrument_background (bool) – Whether to use the instrument background in the fit (Default: False). If False, AutoEMX computes the background while fitting.

  • use_project_specific_std_dict (bool) – If True, tries to load the dictionary of reference standards from the project folder. If not found, uses the file “EDS_Stds_{beamenergy}keV.json” in the local calibration folder of the microscope (~/.autoemx/calibrations/<microscope_ID>/).

  • min_total_counts_fraction (float) – Minimum accepted total spectrum counts as a fraction of target_acquisition_counts. Spectra below this threshold are flagged quant_flag = 2 (“Total counts too low”). Default is 0.9 (90%). Lower this to quantify shorter acquisitions; 0 disables the check.

  • is_known_phase_mixture (bool) – Whether the sample is a mixture of known phases (the candidate phases). If True, spectra are quantified with the reference P/B values of the standards of these phases, and the analysis characterizes their intermixing. Default is False. Not part of the quantification fingerprint, since the P/B values it selects are (reference_values_by_el_line).

  • identify_missing_elements (bool) – If True, each spectrum is checked for elements missing from its fit before quantification (see autoemx.core.fitter.peak_identification). Elements whose addition surely improves the fit of the peaks are added and quantified (or only fitted, if no standard is available); weaker detections are only reported as possibly present. Default is False.

  • identification_seed_spectra (int) – Number of spectra checked without prior knowledge; the elements found in them are then tested first in the remaining spectra, to save time. Default is 10.

  • identification_z_range (Tuple[int, int]) – Atomic numbers of the elements the identification of missing elements may propose. Default is (5, 83), B to Bi; use (5, 92) to include Th and U.

  • identification_excluded_elements (List[str]) – Elements never proposed. Default: Tc, Pm (no stable isotopes) and the noble gases Ne, Kr, Xe, Rn.

DEFAULT_MIN_TOTAL_COUNTS_FRACTION: ClassVar[float] = 0.9
method: str
spectrum_lims: Tuple[float, float]
fit_tolerance: float
use_instrument_background: bool
use_project_specific_std_dict: bool
min_total_counts_fraction: float
is_known_phase_mixture: bool
identify_missing_elements: bool
identification_seed_spectra: int
identification_z_range: Tuple[int, int]
identification_excluded_elements: List[str]
ALLOWED_METHODS: ClassVar[List[str]] = ['PB']
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class autoemx.config.runtime_configs.PowderMeasurementConfig(*, par_selection_mode: Literal['auto', 'manual', 'list']='auto', img_shift_tracking: bool = True, par_search_frame_width_um: float | None = None, max_n_par_per_frame: int = 30, max_spectra_per_par: int = 3, max_area_par: float = 300.0, min_area_par: float = 10.0, par_mask_margin: float = 1.0, xsp_spots_distance_um: float = 1.0, par_spot_selection_mode: Literal['auto', 'callback']='auto', par_segmentation_model: str = 'threshold_bright', par_brightness_thresh: int = 100, par_segmentation_params: Dict[str, ~typing.Any]=<factory>, par_xy_spots_thresh: int = 100, par_feature_selection: str = 'random', par_spot_spacing: str = 'random', min_par_pixels: int = 80, size_stats_plot_format: Literal['png', 'svg', 'pdf', 'jpg', 'tif']='png', size_stats_ci_tolerance: float | None = None, size_stats_ci_quantities: Literal['D10', 'D50', 'D90', 'D43', 'Dv10', 'Dv50', 'Dv90']]=<factory>, size_stats_max_n_frames: int = 500, size_stats_max_time_min: float | None = None, include_eds_auto_particles: bool = True)[source]

Bases: BaseModel

Configuration for powder measurement.

Variables:
  • par_selection_mode (str) –

    Particle navigation mode (default: ‘auto’):

    • 'auto': automatic frame scan and particle detection

    • 'manual': prompt the user to center each particle

    • 'list': visit a caller-supplied list of ledger particle ids or absolute stage coordinates in mm (see batch_acquire_and_analyze)

  • img_shift_tracking (bool) – Whether to use image shift tracking during acquisition (Default = True).

  • par_search_frame_width_um (float, optional) – Frame width used when searching for particles, in um. Default: min(20*max_par_radius, 500 um)

  • max_n_par_per_frame (int) – Maximum number of particles analyzed in a single frame. Used to ensure spatial representation of the analyzed sample.

  • max_spectra_per_par (int) – Maximum number of spot X-ray spectra collected in a single particle. Limiting this ensures more particles are analyzed.

  • max_area_par (float) – Maximum area (in µm²) for a particle to be considered.

  • min_area_par (float) – Minimum area (in µm²) for a particle to be considered.

  • par_mask_margin (float) – Margin (in µm) from particle edge where X-ray spectra should not be collected.

  • xsp_spots_distance_um (float) – Min distance between X-ray spectrum acquisition points

  • par_segmentation_model (str) – Model to use for particle segmentation. Default: “threshold_bright”

  • par_brightness_thresh (int) – Intensity threshold in 8-bit image that defines a particle over a dark background.

  • par_xy_spots_thresh (int) – Intensity threshold in 8-bit image that defines bright (i.e., thickest) regions in particles. X-ray spectra are acquired only from these regions. Particle pixel intensities are scaled to 8-bit prior threhsolding, i.e., darkest pixel will be set to 0, and brightest to 255.

  • par_feature_selection (str) – ‘random’ for random selection of points within bright regions, ‘peaks’ for brightest peak spots (default: ‘random’).

  • par_spot_spacing (str) – ‘random’ for unbiased spot selecton, ‘maximized’ for maximized spot spacing over particle (default: ‘random’).

  • par_spot_selection_mode (str) – ‘auto’ for built-in spot selection, ‘callback’ to supply spots via xsp_spot_selector (default: ‘auto’).

  • min_par_pixels (int) – Minimum number of pixels covered by a particle for its area to be measured in particle size statistics (default: 80, i.e. a diameter of about 10 pixels). Smaller particles are measured in frames of a finer size band (see EM_Particle_Finder.get_particle_stats).

  • size_stats_plot_format (str) – File format of the particle size distribution plot: ‘png’ (default), ‘svg’, ‘pdf’, ‘jpg’ or ‘tif’.

  • size_stats_ci_tolerance (float, optional) – Particle size statistics stop when the 95 % confidence interval of each of size_stats_ci_quantities is within ± this fraction of its value (e.g. 0.05), n_par_target then being the minimum number of particles per size band. None (default): stop at n_par_target.

  • size_stats_ci_quantities (list of str) – Statistics whose precision is checked: ‘D10’, ‘D50’, ‘D90’, ‘D43’, ‘Dv10’, ‘Dv50’, ‘Dv90’ (default: [‘D50’]).

  • size_stats_max_n_frames (int) – Maximum number of frames analysed when stopping on precision (default: 500).

  • size_stats_max_time_min (float, optional) – Maximum duration, in minutes, of a measurement stopping on precision (default: None, no limit).

  • include_eds_auto_particles (bool) – Whether particle size statistics also include what EDS measured on the sample with par_selection_mode ‘auto’ (default: True): the particles counted in the frames it searched, or, for samples measured before these were recorded, the particles it measured. Particles chosen manually or from a list are never included, since their choice is not unbiased.

DEFAULT_PAR_SEGMENTATION_MODEL: ClassVar[str] = 'threshold_bright'
AVAILABLE_SPOT_SELECTION_MODES: ClassVar[Tuple[str, ...]] = ('auto', 'callback')
AVAILABLE_PAR_SELECTION: ClassVar[Tuple[str, ...]] = ('auto', 'manual', 'list')
par_selection_mode: Literal['auto', 'manual', 'list']
img_shift_tracking: bool
par_search_frame_width_um: float | None
max_n_par_per_frame: int
max_spectra_per_par: int
max_area_par: float
min_area_par: float
par_mask_margin: float
xsp_spots_distance_um: float
par_spot_selection_mode: Literal['auto', 'callback']
par_segmentation_model: str
par_brightness_thresh: int
par_segmentation_params: Dict[str, Any]
par_xy_spots_thresh: int
par_feature_selection: str
par_spot_spacing: str
min_par_pixels: int
size_stats_plot_format: Literal['png', 'svg', 'pdf', 'jpg', 'tif']
size_stats_ci_tolerance: float | None
size_stats_ci_quantities: List[Literal['D10', 'D50', 'D90', 'D43', 'Dv10', 'Dv50', 'Dv90']]
size_stats_max_n_frames: int
size_stats_max_time_min: float | None
include_eds_auto_particles: bool
AVAILABLE_PAR_SEGMENTATION_MODELS: ClassVar[List[str]] = ['threshold_bright', 'SAM2', 'microSAM']
AVAILABLE_FEATURE_SELECTION: ClassVar[Tuple[str, ...]] = ('random', 'peaks')
AVAILABLE_SPOT_SPACING_SELECTION: ClassVar[Tuple[str, ...]] = ('random', 'maximized')
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class autoemx.config.runtime_configs.BulkMeasurementConfig(*, grid_spot_spacing_um: float = 100.0, min_xsp_spots_distance_um: float = 5.0, image_frame_width_um: float | None = None, randomize_frames: bool = False, exclude_sample_margin: bool = False)[source]

Bases: BaseModel

Configuration for characterization or bulk-like samples.

Variables:
  • grid_spot_spacing_um (float) – Distance between grid points to measure, in micrometers (µm).

  • min_xsp_spots_distance_um (float) – Offset distance for acquisition spot grid if the original grid does not contain enough spots to measure the required number of spectra, in micrometers (µm).

  • image_frame_width_um (float, optional) – Width of the image frame in micrometers (µm). If not specified, defaults to 10 × grid_spot_spacing_um.

  • randomize_frames (bool) – Whether to randomize the order of spectra acquisition in the constructed grid.

  • exclude_sample_margin (bool) – Whether to exclude the margin of the sample (useful if contaminated).

grid_spot_spacing_um: float
min_xsp_spots_distance_um: float
image_frame_width_um: float | None
randomize_frames: bool
exclude_sample_margin: bool
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class autoemx.config.runtime_configs.ExpStandardsConfig(*, is_exp_std_measurement: bool = False, formula: str = '', els_to_use_for_mean_PB_calc: ~typing.List[str] | None = ['all'], generate_separate_std_dict: bool = False, min_acceptable_PB_ratio: float = 10, quant_flags_accepted: ~typing.List[int] = <factory>)[source]

Bases: BaseModel

Configuration for the collection of experimental standards.

Variables:
  • is_exp_std_measurement (bool) – Whether the configuration corresponds to the measurement of an experimental standard (Default = False) If True, a valid formula must be provided and weight fractions will be automatically calculated.

  • formula (str) – Chemical formula of the experimental standard. Required if is_exp_std_measurement is True. Must be parseable by pymatgen.core.Composition.

  • els_to_use_for_mean_PB_calc (Optional[List[str]]) –

    List of element symbols (e.g., [“Fe”, “O”]) to use for mean PB calculation. Special values:

    • [“all”] or [“All”]: use all elements/lines as standards (default)

    • None, [], [“none”], or [“None”]: use no elements/lines

  • generate_separate_std_dict (bool) – Whether the acquired reference standard values are added to the current reference dictionary. If True, copies the current standard dictionary to the project folder and updates it. If such .json file is already present in the project folder, then it updates it. This is generally used when measuring the extent of the intermixing of known phases (samples quantified with QuantificationOptionsConfig.is_known_phase_mixture = True).

  • min_acceptable_PB_ratio (float) – Minimum PB ratio required for a peak to be accepted as a standard. in cnts/cnts*keV^-1 (Default = 10).

  • quant_flags_accepted (List[int]) – List of quantification flags considered acceptable. Other spectra are filtered out before clustering. See the user documentation page “Quantification flags (quant_flag)” for the meaning of each value. Common defaults are [0] (experimental standards) or [0, -1] (analysis workflows).

Raises:

ValueError – If is_exp_std_measurement is True but formula is missing or invalid.

is_exp_std_measurement: bool
formula: str
els_to_use_for_mean_PB_calc: List[str] | None
generate_separate_std_dict: bool
min_acceptable_PB_ratio: float
quant_flags_accepted: List[int]
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

formula_w_frs() → Dict[str, float] | None[source]

Mass fractions of the standard computed from its formula, or None if no formula is set.

The standard’s composition is stored in SampleConfig.w_frs, which is set from this value.

class autoemx.config.runtime_configs.PlotConfig(*, show_unused_comps_clust: bool = True, els_excluded_clust_plot: List[str] = <factory>, els_to_plot: List[str] = <factory>, show_legend_clustering: bool = True, save_plots: bool = True, show_plots: bool = False, use_custom_plots: bool = False, custom_plot_file: str | None = None, plot_best_mixture: bool = True, intermixing_violin_plots: bool | None = None)[source]

Bases: BaseModel

Configuration for plotting.

Variables:
  • show_unused_comps_clust (bool) – Whether to plot unused data points in clustering plot.

  • els_excluded_clust_plot (List[str]) – Elements to exclude in cluster plot when more than 3 elements are present.

  • els_to_plot (List[str]) – Elements forced onto the clustering plot axes (opposite of els_excluded_clust_plot). When non-empty, these elements are kept and the final axes must contain exactly 2 or 3 elements.

  • bool (show_legend_clustering) – Whether to show the legend in the clustering plot. Default: True

  • save_plots (bool) – Whether to save plots to disk.

  • show_plots (bool) – Whether to display plots interactively.

  • use_custom_plots (bool) – Whether to use custom plotting routines.

  • custom_plot_file (Optional[str]) – Path to a user-editable custom plotting file.

  • plot_best_mixture (bool) – Whether to plot the top-ranked mixture of each cluster, when it combines 2 or 3 candidate phases (Mixture_plot_cl<i>.png). Default: True

  • intermixing_violin_plots (Optional[bool]) – Whether to plot the intermixing of the phases of the reported mixtures as violin plots (Mixture_decomposition_plot_cl<i>_*.png). If None (default), they are plotted for samples quantified as known phase mixtures (QuantificationOptionsConfig.is_known_phase_mixture).

show_unused_comps_clust: bool
els_excluded_clust_plot: List[str]
els_to_plot: List[str]
show_legend_clustering: bool
save_plots: bool
show_plots: bool
use_custom_plots: bool
custom_plot_file: str | None
plot_best_mixture: bool
intermixing_violin_plots: bool | None
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].