Auto Peak Fit v1.2.0

Aus Dpdak
Wechseln zu: Navigation, Suche

Fit a single peak without give the initial parameters.

Figure 1: Screenshot of the "Auto Peak Fit" plugin.

Plugin Parameters

  • First Fit Line Number(optional): Defines start row number for fitting. If empty, the min. row number is used.
  • Last Fit Line Number(optional): Defines end row number for fitting. If empty, the max. row number is used.
  • Fit Function: A model function with background line to fit the peak.
    • Gauss: Gaussian function with background line; f(x) = 2*A/H*sqrt(ln(2)/pi)*exp(-4*ln(2)*((x - x0)/H)*((x - x0)/H)) + |k*x + d|.
    • Lorentz: Lorentzian function with background line; f(x) = 2*A/(pi*H)/(1+4*((x - x0)/H)*((x - x0)/H)) + |k*x + d|.
    • Voigt: Voigt function with background line; f(x) = [2*A/H*sqrt(ln(2)/pi)*exp(-4*ln(2)*((x - x0)/H)*((x - x0)/H))]*(1-|n|) + [2*A/(pi*H)/(1+4*((x - x0)/H)*((x - x0)/H))]*|n| + |k*x + d|
    • Line: Linear function; f(x) = k*x + d

Function Parameters

  • H: Full width at half maximum (FWHM).
  • A: Area of the peak.
  • x0: Peak position.
  • k: The slope of background line.
  • d: The y-axis intercept of background line.
  • n: The distribution part of Gauss and Lorentz in the Voigt function.


  • q: The q or chi values of an intensity profile.
  • I: The intensity values of an intensity profile.


  • q_orig: Same as input q.
  • I_orig: Same as input I.
  • q_fit: Same as q_orig.
  • I_fit: The fitted curve.
  • fit_base_line: The background line.
  • fit_param: A List of the fitted parameters [q0, FWHM, A, [n]].
  • fit_sderr: A list of the uncertainties of the fitted parameters [q0_err, FWHM_err, A_err, [n_err]].
  • chi_square: The chi-squared distribution of the fit result.
  • root_mean_square: The Root-Mean-Square of residuals.
  • model_function: The used fit function name.
  • fit_line_range: The used fit range.
  • peak_value: The fitted peak position.