ewoksfluo.xrffit.fit.fast_fit.fit_xrf_spectra#
- ewoksfluo.xrffit.fit.fast_fit.fit_xrf_spectra(xrf_spectra, configuration, quantification=None, individual_weights=None, live_times=None, positive_peak_areas=None, diagnostics=None)[source]#
Fast fitting refers to linear fitting of several spectra by solving a single system of equations. This function does not use the high-level API from PyMca. It uses the low-level API to
calculate elemental spectra
calculate mass fractions from fit results
strip spectral background
and perform linear least-squares fit.
- Parameters:
xrf_spectra (
ndarray) – shape (num_spectra, num_channels)configuration (
PyMcaXrfConfiguration) – PyMca configuration.quantification (
Optional[bool]) – Calculate mass fractions from peak area’s.individual_weights (
Optional[bool]) – When fitting with weights, use the weight of each spectrum (slow) instead of the average weight.live_times (
Optional[ndarray]) – 1D array with one value for each XRF spectrum. Only used for mass fractions with fundamental parameters.positive_peak_areas (
Optional[bool])diagnostics (
Optional[bool]) – fit model and residuals.
- Return type: