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
polynomialbaselinefitting 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.