- qspec.models. gen_model ( ijj , shape=None , qi=False , hf_mixing=False , hf_config=None , n_peaks=None , offsets=None , x_cuts=None , convolve=None )[source]
-
Create a lineshape model to fit arbitrary atomic fluorescence spectra. The model is composed of the
Spectrum, aSplitterfor each set of quantum numbers inijj, optionally anNPeakand aConvolvedmodel, and anOffsetmodel.- Parameters:
-
- ijjscalar_nd
The three or an iterable of three quantum numbers $I$, $J_l$ and $J_u$. Must be a list with the format
[I, J_l, J_u]or[[I0, J0_l, J0_u], [I1, J1_l, J1_u], ...].- shapestr | type | _spectrum.Spectrum | None
A
strrepresentation of aSpectrumtype, seeSPECTRA, or aSpectrumtype. IfNone, theEmptymodel is used.- qibool
Whether to use a quantum interference model, see
HyperfineQI.- hf_mixingbool
Whether to use a hyperfine-induced mixing model, see
HyperfineMixed. Not implemented forqi=True.- hf_configdict | None
A
dictcontaining the configuration for the hf mixing. Only used ifhf_mixing=True.- n_peaksint | None
The number of "peaks per resonance" or "lineshape duplicates", see
NPeak.- offsetsarray_like | None
The orders of the offset polynomials of the separate x-axis intervals. Must be a list or a single value. In the former case
len(offsets) == len(x_cuts) + 1must hold. IfoffsetsisNone, a single constant offset is assumed.- x_cutsarray_like | None
The x values where to cut the x-axis. Must be a list or a single value. In the former case
len(offsets) == len(x_cuts) + 1must hold. Ifx_cutsisNone, the x-axis will not be cut.- convolvestr | type | _convolved.Convolved | None
A
strrepresentation of aConvolvedtype, seeCONVOLVE, or aConvolvedtype.
- Returns:
-
- model_base.Model
The constructed lineshape model.
- Raises:
-
- NotImplementedError
If both
qiandhf_mixingareTrue.- ValueError
If
ijj,shapeorconvolvehave an invalid format or value.