atomcloud.process_fits.iterate module

class atomcloud.process_fits.iterate.IterateFitDict[source]

Bases: ABC

mixed_level_fit(all_fit_dicts, *args, **kwargs)[source]

Process a mixed level fit dictionary. The mixed level fit is composed of either 1d multi-function fits, 2d multi-function fits, or sum fits. This function iterates through each fit level and calls the appropriate processing function for each fit level.

Parameters:
  • all_fit_dicts (dict[dict]) – dictionary of fit dictionaries

  • *args – additional arguments

  • **kwargs – additional keyword arguments

Returns:

dictionary of processed fit dictionaries

Return type:

dict

abstract process_fitdict1d(fit_dict, *args, **kwargs)[source]

Process a single 1d fit dictionary. It’s important to deepcopy the dictionary before processing it to avoid changing the original dictionary.

Parameters:

fit_dict (dict) –

Return type:

dict

abstract process_fitdict2d(fit_dict, *args, **kwargs)[source]

Process a single 2d fit dictionary. It’s important to deepcopy the dictionary before processing it to avoid changing the original dictionary.

Parameters:

fit_dict (dict) –

Return type:

dict

single_level(fit_dict, *args, **kwargs)[source]

Process a single level from a multi-level fit dictionary. The single level fit is either a 1d multi-function fit, 2d multi-function fit, or sum fits. This function calls the appropriate processing function for the fit level.

Parameters:
  • fit_dict (dict) – dictionary of fit dictionaries

  • *args – additional arguments

  • **kwargs – additional keyword arguments

Returns:

dictionary of processed fit dictionaries

Return type:

dict

sum_fit(fit_dict, *args, **kwargs)[source]

Process a single sum fit dictionary. The sum fit dictionary is composed of sub-dictionaries of 1d fits to the summed data on the x and y axes (along with a dictionary of 2d fits calculated from the 1d fits). These are already deepcopied in their respective processing functions.

Parameters:

fit_dict (dict[dict]) –

Return type:

dict