qspec logo qspec logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2026 Patrick Müller. All rights reserved.

qspec.models. NPeak  (  model ,  n_peaks=1  )[source]

The submodel $g$ duplicated n_peaks times at the positions $x_i$ with intensities $p_i$

$$ f(x) = \sum\limits_{i=0}^{n - 1} p_i\,g(x - x_i). $$

The parameters are named x{i} and p{i}. The position x0 and the intensity p0 are fixed by default.

Parameters:
modelModel

A submodel whose parameters are adopted by this model.

n_peaksint_like

The number $n$ of times the submodel is duplicated.

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 Linked model.

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 model is None.