fitting.lorentzians_cubic

fitting.lorentzians_cubic(x, a, b, c, d, *p)

Sum over variable number of Lorentzians on a cubic background.

Parameters:
  • x (array) – x-values.
  • a (float) – Offset.
  • b (float) – Linear term.
  • c (float) – Quadratic term.
  • d (float) – Cubic term.
  • p (variable) –

    Coefficients for Lorentzians. For each Lorentzian provide

    • A amplitude,
    • x0 center,
    • dx FWHM.
Returns:

Sum over Lorentzians f(x) = \sum_i L_i(x) + a + b x + c x^2 + d x^3.