Check out the Hyperspy Workshop May 13-17, 2024 Online

fit_atomic_scattering#

ReducedIntensityGenerator1D.fit_atomic_scattering(elements, fracs, N=1.0, C=0.0, scattering_factor='lobato', plot_fit=True, *args, **kwargs)[source]#

Fits a diffraction intensity profile to the background.

Uses FIT = N * sum(ci * (fi^2) + C)

The cutoff for the scattering factor fit to s is defined via the function set_s_cutoff above.

Parameters:
  • elements (list of str) – A list of elements present (by symbol). No order is necessary. Example: [‘Ca’, ‘C’, ‘O’] (for CaCO3)

  • fracs (list of float) – A list of fraction of the respective elements. Should sum to 1. Example: [0.2, 0.2, 0.6] (for CaCO3)

  • N (float) – The “slope” of the fit. Initial value is used to start the fit.

  • C (float) – An additive constant to the fit. Initial value is used to start the fit.

  • scattering_factor (str) – Type of scattering parameters fitted. Default is lobato. See scattering_fit_component for more details.

  • plot_fit (bool) – A bool to decide if the fit from scattering is plotted after fitting.

  • *args – Arguments to be passed to hs.multifit().

  • **kwargs – Keyword arguments to be passed to hs.multifit().