kinextract.grow_boolean_mask
- kinextract.grow_boolean_mask(mask: ndarray, grow_pix: int) ndarray[source]
Dilate a boolean mask by a fixed number of pixels on each side.
Used to extend rejection/exclusion masks (e.g. absorption-clean rejections or emission-line masks) a few pixels beyond the originally flagged pixels, so that line wings adjacent to a flagged pixel are also excluded rather than leaving a single unmasked pixel at the edge of a feature.
- Parameters:
- Returns:
Grown mask, same shape as mask; True wherever any pixel within grow_pix samples was True in the input.
- Return type:
ndarray of bool