perimeter_mask

laserbeamsize.masks.perimeter_mask(image, corner_fraction=0.035)[source]

Create boolean mask for image with a perimeter marked as True.

The perimeter is the same width as the corners created by corner_mask which is a fixed percentage (default 3.5%) of the entire image.

Parameters:
  • image – the image to work with

  • corner_fraction – determines the width of the perimeter

Returns:

masked_image – 2D array with True values around rect perimeter