mask module

define_mask(h=2048, w=2048, inner_radius=40, white_width=8, black_width=10)[source]

Returns a multiring mask of the given dimensions that can be multiplied to filter an XRD image.

Authors: Weiqi Yue, Gabriel Ponon, Zhuldyz Ualikhankyzy, Nathaniel K. Tomczak Version: v0_1 (Jul 23 2022)

Parameters:
  • h (int) – Height of the image.

  • w (int) – Width of the image.

  • inner_radius (int) – Inner radius of the first ring.

  • white_width (int) – Width of the transparent ring portions for the filter.

  • black_width (int) – Width of the opaque ring portions for the filter.

Returns:

The resulting multiring mask.

Return type:

numpy.ndarray