- qspec.models. Offset ( model=None , x_cuts=None , offsets=None )[source]
-
Cut the x-axis into intervals and add an offset polynomial to the submodel $g$ in every interval $i$
$$ f(x) = g(x) + \sum\limits_{k=0}^{n_i} a_{ik}x^k. $$The parameters $a_{ik}$ are named
off{i}e{k}.- Parameters:
-
- modelModel | None
The submodel $g$ the offset will be added to. If
None, the offset will be added to zero.- x_cutsarray_like | None
The x values where to cut the x-axis.
- offsetsarray_like | None
A list of the maximum polynomial orders $n_i$ for each interval. The list must have length
len(x_cuts) + 1. IfNone, a single constant offset is used.
- Attributes:
-
- descriptionstr
A description of the model hierarchy, e.g.,
"Offset.Summed[0].Hyperfine.Voigt".- dxfloat
A hint for an x-axis step size for a smooth display of the model.
- errorstr
An error message if there is an issue with the model parameters (not implemented).
- fixeslist[fix_type]
The fix states of the parameters, see
Model.set_fix.- linkslist[bool]
Whether the parameters are linked to the parameters with the same name in a
Linkedmodel.- modelModel | None
The submodel.
- nameslist[str]
The names of the parameters.
- pdict[str, int]
A map of the parameter names to their indexes.
- sizeint
The number of parameters required by the model.
- typestr
The name of the model type.
- valslist[float]
The current values of the parameters.
- Raises:
-
- ValueError
If
offsetsdoes not have lengthlen(x_cuts) + 1.