skued.reflection

skued.reflection(im, angle, center=None, mask=None, fill_value=0.0)

Symmetrize an image according to a reflection plane.

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

  • angle (float) – Angle (in degrees) of the line that defines the reflection plane. This angle increases counter-clockwise from the positive x-axis. Angles larger that 360 are mapped back to [0, 360). Note that angle and angle + 180 are equivalent.

  • 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).

  • 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