Check out the Hyperspy Workshop May 13-17, 2024 Online

find_beam_center_interpolate#

pyxem.utils.diffraction.find_beam_center_interpolate(z, sigma, upsample_factor, kind)[source]#

Find the center of the primary beam in the image img by summing along X/Y directions and finding the position along the two directions independently.

Parameters:
  • sigma (int) – Sigma value for Gaussian blurring kernel for initial beam center estimation.

  • upsample_factor (int) – Upsample factor for subpixel beam center finding, i.e. the center will be found with a precision of 1 / upsample_factor of a pixel.

  • kind (str or int, optional) – Specifies the kind of interpolation as a string (‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’, ‘previous’, ‘next’, where ‘zero’, ‘slinear’, ‘quadratic’ and ‘cubic’ refer to a spline interpolation of zeroth, first, second or third order; ‘previous’ and ‘next’ simply return the previous or next value of the point) or as an integer specifying the order of the spline interpolator to use.

Returns:

center – numpy.ndarray, [y, x] containing indices of estimated direct beam positon

Return type:

numpy.ndarray