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.