MaskPlaneBit#

class lsst.images.MaskPlaneBit(index: int, mask: integer)#

Bases: object

The nested array index and mask value associated with a single mask plane.

Methods Summary

check(value)

Test if this bit is set on a single Mask pixel value.

compute(overall_index, stride, mask_type)

Construct a MaskPlaneBit from the overall index of a plane in a MaskSchema and the stride (number of bits per mask array element).

Methods Documentation

check(value: ndarray) bool#

Test if this bit is set on a single Mask pixel value.

Parameters#

value

A 1-d array of length MaskSchema.mask_size, representing a single pixel in a Mask.

classmethod compute(overall_index: int, stride: int, mask_type: type[integer]) MaskPlaneBit#

Construct a MaskPlaneBit from the overall index of a plane in a MaskSchema and the stride (number of bits per mask array element).

Parameters#

overall_index

Index of the plane across the whole schema.

stride

Number of mask bits per array element.

mask_type

Integer dtype of the mask array elements.