spectrochempy.polynomial

polynomial(x, offset=0.0, slope=0.0, ampl=1.0, **kwargs)[source]

Return a 1D polynomial profile.

This helper evaluates a centered polynomial using the same parameterization as the polynomialbaseline fitting shape, while also allowing an optional constant offset and linear slope for convenient signal construction.

Parameters
  • x (array-like, Coord or NDDataset) – Abscissa values.

  • offset (float, optional) – Constant offset added to the profile.

  • slope (float, optional) – Linear slope applied around the centre of x.

  • ampl (float, optional) – Global scaling factor applied to the polynomial terms.

  • **kwargs – Polynomial coefficients such as c_2=..., c_3=..., etc.