skued.nfold

skued.nfold(im, mod, center=None, mask=None, fill_value=0.0)

Returns an images averaged according to n-fold rotational symmetry. This can be used to boost the signal-to-noise ratio on an image with known symmetry, e.g. a diffraction pattern.

Parameters:
  • im (array_like, ndim 2) – Image to be azimuthally-symmetrized.

  • center (array_like, shape (2,) or None, optional) – Coordinates of the center (in pixels) in the format center=[col, row]. If center=None, the image is rotated around the center of the array, i.e. center=(cols / 2 - 0.5, rows / 2 - 0.5).

  • mod (int) – Fold symmetry number. Valid numbers must be a divisor of 360.

  • mask (~numpy.ndarray or None, optional) – Mask of image. The mask should evaluate to True (or 1) on valid pixels. If None (default), no mask is used.

  • fill_value (float, optional) – In the case of a mask that overlaps with itself when rotationally averaged, the overlapping regions will be filled with this value.

Returns:

out – Symmetrized image.

Return type:

~numpy.ndarray, dtype float

:raises ValueError : If mod is not a divisor of 360 deg.: