Logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2025 Patrick Müller. All rights reserved.

qspec.analyze.King  (  a m x_abs = None subtract_electrons = 0.0 n_samples = 100000 element_label = None  )[source]

A class for $n$-dimensional King plots, encapsulating the linear regression algorithms of the qspec.analyze module. Call King.fit or King.fit_nd for $2$- or $n$-dimensional fitting.

Parameters:
andarray | Iterable

An iterable of the mass numbers $A$ of the considered isotopes with shape (k, ), where k is the number of isotopes.

mndarray | Iterable

The masses and their uncertainties of the isotopes a (u). m must have shape (k, 2).

x_absndarray | Iterable

The absolute values of the data vectors and their standard deviations corresponding to the mass numbers a. If given, the x and y parameters can be omitted in King.fit and King.fit_nd, and are determined automatically as the shift between the mass numbers a and a_ref. Must have shape (k, n, 2) where n is the number of dimensions of the King plot.

subtract_electronsscalar

The number of electron masses that should be subtracted from the specified isotope masses. subtract_electrons can be a float if the ionization energy shall be considered.

n_samplesint

The number of generated samples for the monte-carlo routines.

element_labelstr

The label of the element to enhance the printed and plotted information.

API navigation