ewoksfluo.xrffit.fit.perform_batch_fit(xrf_spectra_uris, cfg, output_buffer, energy=None, energy_multiplier=None, mlines=None, quantification=None, fast=False)[source]

Fit XRF spectra in batch with one primary beam energy. Least-square fitting. If you intend a linear fit, modify the configuration:

  • Get current energy calibration with “Load From Fit”

  • Enable: Perform a Linear Fit

  • Disable: Stripping

  • Strip iterations = 0

Fast linear least squares:

  • Use SNIP instead of STRIP

  • xrf_spectra_uris (Sequence[str]) – spectra to fit.

  • cfg (Union[str, ConfigDict]) – configuration file to use.

  • output_buffer – object that receives the fit results.

  • energy (Optional[float]) – primary beam energy. Defaults to None.

  • mlines (Optional[dict]) – elements (keys) which M line group must be replaced by some M subgroups (values). Defaults to None.

  • quantification (Optional[dict]) – save massfractions. Defaults to False.

  • fast (bool) – use SNIP instead of STRIP. Defaults to False.

  • diagnostics – fit model and residuals. Defaults to False.

  • figuresofmerit – chi-square value and other figures of merit. Defaults to False.

  • energy_multiplier (Optional[float]) – adds a higher energy bound equal to energy*energy_multiplier to include high-energy peaks. Default: no bound is added.


ValueError – if all paths in filelist do not have the same HDF5 group as parent.

Return type: