genmask

mcalf.utils.mask.genmask(width, height, radius=inf, right_shift=0, up_shift=0)[source]

Generate a circular mask of specified size

Parameters
  • width (int) – Width of mask.

  • height (int) – Height of mask.

  • radius (int, optional, default = inf) – Radius of mask.

  • right_shift (int, optional, default = 0) – Indices to shift forward through row.

  • up_shift (int, optional, default = 0) – Indices to shift forward through columns.

Returns

array – The generated mask.

Return type

ndarray of shape (height, width)