scippneutron.peaks.model.Model#
- class scippneutron.peaks.model.Model(*, param_names, prefix='')[source]#
Abstract base class for fitting models.
This class defines the basic interface for models by way of public methods. Subclasses should override the protected methods
_call
,_guess
, and optionally_param_bounds
instead of their public counterparts.Methods
__init__
(*, param_names[, prefix])Initialize a base 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
Parameter bounds.
Parameter names including the prefix.
Prefix for parameter names.
- fwhm(params)[source]#
Compute full width at half maximum.
Note that this function is only implemented for peaked models!
- guess(data, *, coord=None)[source]#
Roughly estimate the model parameters for given data.
The estimate can be used as the starting point for a fit but does not necessarily represent a good fit by itself.
- Parameters:
- Returns: