fit_cbed_pattern

fit_cbed_pattern#

ptyrad.utils.image_proc.fit_cbed_pattern(image, initial_guess=None, verbose=False)[source]#

Estimate the center, radius, and std of a CBED pattern by minimizing the difference between the observed image and a synthetic model.

Parameters:
  • image (np.ndarray) – The input image to fit.

  • initial_guess (dict, optional) – Dictionary with initial guess parameters.

  • verbose (bool) – Whether to print detailed information during fitting.

Returns:

Dictionary containing the fitted parameters as dict[‘center’, ‘radius’, ‘std’].

Return type:

dict