scippneutron.peaks.model.PolynomialModel#
- class scippneutron.peaks.model.PolynomialModel(*, degree, prefix='')[source]#
A polynomial of fixed degree.
PolynomialModel(degree=n)implements\[f(x; a_0, \ldots, a_n) = \sum_{i=0}^{n}\,a_i x^i\]where the sum is inclusive on the upper bound. \(a_i\) are the parameters and are named
['a0', 'a1', ...].Methods
__init__(*, degree[, prefix])Initialize a polynomial model.
fwhm(params)Compute full width at half maximum.
guess(data, *[, coord])Roughly estimate the model parameters for given data.
with_prefix(prefix)Return a copy of the model with a new prefix.
Attributes
The degree of the polynomial.
param_boundsParameter bounds.
param_namesParameter names including the prefix.
prefixPrefix for parameter names.