autoemxsp.runners.batch_fit_spectra module

Run fitting for multiple spectra across multiple samples to extract values of fitting parameters.

param sample_IDs:

List of sample identifiers.

type sample_IDs:

list of str

param spectrum_IDs:

List of spectrum IDs to process (values reported in ‘Spectrum #’ column in Data.csv), or ‘all’ to process all spectra in each sample.

type spectrum_IDs:

list of int or str

param is_standard:

Defines whether measurement is of a standard (i.e., well defined composition) or not

type is_standard:

bool

param fit_params_vals_to_extract:

List of fitting parameter names whose value to extract and save

type fit_params_vals_to_extract:

list of str, optional

param samples_path:

Base directory where results are stored. Default: autoemxsp/Results

type samples_path:

str, optional

param output_path:

Directory where the extracted values of fitted parameters are saved. Default: /Fitting output

type output_path:

str, optional

param use_instrument_background:

Whether to use instrument background if present.

type use_instrument_background:

bool, optional

param quantify_plot:

Whether to plot quantification results.

type quantify_plot:

bool, optional

param plot_signal:

Whether to plot the signal.

type plot_signal:

bool, optional

param zoom_plot:

Whether to zoom on a specific line.

type zoom_plot:

bool, optional

param line_to_plot:

Line to zoom in plot.

type line_to_plot:

str, optional

param els_substrate:

List of substrate elements.

type els_substrate:

list, optional

param fit_tol:

Fit tolerance.

type fit_tol:

float, optional

param is_particle:

If True, treat sample as particle (powder).

type is_particle:

bool, optional

param max_undetectable_w_fr:

Maximum allowed weight fraction for undetectable elements (default: 0).

type max_undetectable_w_fr:

float, optional

param force_single_iteration:

If True, quantification will be run for a single iteration only (default: False).

type force_single_iteration:

bool, optional

param interrupt_fits_bad_spectra:

If True, interrupt fitting if bad spectra are detected (default: False).

type interrupt_fits_bad_spectra:

bool, optional

param print_results:

If True, prints all fitted parameters and their values (default: True).

type print_results:

bool, optional

param quant_verbose:

If True, prints quantification operations

type quant_verbose:

bool, optional

param fitting_verbose:

If True, prints fitting operations

type fitting_verbose:

bool, optional

returns:

quantifier – The quantifier object containing the results, fit parameters, and methods for further analysis and plotting.

rtype:

XSp_Quantifier