atomcloud.plots.plot_sumfit module
Created on Tue Mar 22 23:03:21 2022
@author: hofer
- class atomcloud.plots.plot_sumfit.Plot2DSumFit[source]
Bases:
Plot2DBaseClass for plotting 2D sum fits. Inherits from the base 2D plotting class.
- plot_fit(fit_dicts, XY_tuple, data, mask=None, title='', savepath=None, verbose=True, *args, **kwargs)[source]
Plot the fit results from the 2D sum fit.
- Parameters:
fit_dicts (dict) – Dictionary containing the fit results for a 2D multi-function fit.
XY_tuple (tuple[np.ndarray, np.ndarray]) – The x and y coordinates of the data.
data (np.ndarray) – The original data which was fit using the multi-function to determine the parameters (params).
mask (np.ndarray, optional) – The mask to be applied to the data.
title (str, optional) – The title of the plot. Defaults to ‘’.
savepath (str, optional) – The path to save the plot. Defaults to None.
verbose (bool, optional) – If True, the data for each function will be plotted. Defaults to True.
- Return type:
None
- unpack_fit_dicts(fit_dicts)[source]
Unpack the sumfit fit dictionaries into the necessary components for plotting as they are nested in the fit_dicts and comprised of the 1d and 2d fit dictionaries.
- Parameters:
fit_dicts (dict) – The fit dictionaries for the 2D sum fit.
- Returns:
The function strings for the 2D fit. constraints: The constraints for the 2D fit. params2d: The seed parameters for the 2D fit. xparams: The parameters for the x-axis 1D fit. yparams: The parameters for the y-axis 1D fit.
- Return type:
func_strs