- qspec.analyze. King.fit_nd ( a , a_ref , x = None , axis = 0 , optimize_cov = False , func = 'linear_nd_fit' , show = True , ** kwargs )[source]
-
- Parameters:
-
- andarray | Iterable
An Iterable of the mass numbers of the used isotopes with shape (k, ).
- a_refndarray | Iterable
An Iterable of the mass numbers of the used reference isotopes with shape (k, ).
- xndarray | Iterable
The x data as an iterable of vectors with uncertainties of shape (k, n, 2), where k is the number of data points and n is the number of dimensions of each point.
- axisint
The axis to use for the parametrization. For example, a King plot with the isotope shifts of two transitions ['D1', 'D2'] yields the slope F_D2 / F_D1 if 'axis' == 0.
- optimize_covbool
If True, the origin vector of the straight is optimized to yield the smallest covariances.
- funcCallable | str
The fitting routine. Must be one of {'linear_nd_fit', 'linear_nd_monte_carlo'}.
- showbool
Whether to plot the fit result.
- kwargsNone
Additional keyword arguments are passed to 'func' and 'self.plot_nd'.
- Returns:
-
- outNone
popt, pcov. The optimized parameters and their covariances. The resulting shapes are (2n, ) and (2n, 2n).