qspec.models
The qspec.models module features a class-based framework to construct mathematical functions to be used for fitting.
While its main focus lies on lineshape/resonance-peak models, any custom function can be added to the framework.
All models can be used with popular fitting routines such as
scipy.optimize.curve_fit.
However, to use the full set of features, the built-in wrapper
qspec.models.fit should be used.
A class inheritance diagram of the available models is shown in the following sketch.
All models inherit from the Model class.
The abstract Listed class
enables the combination of models to link parameters or sum models.
The Splitter class
is an abstract class for hyperfine structure models.
Convolved allows numerical convolution of two models and
Spectrum is a generic lineshape/peak model.
For a tutorial on how to use qspec.models, see
Construction and fitting of modular lineshape models.