craftutils.observation.epoch.ImagingEpoch.frame_class.generate_mask(do_not_mask: SkyCoord = (), ext: int = 0, threshold: float = 4, method: str = 'sep', obj_value=1, back_value=0, output_path: str | None = None, margins: tuple = (None, None, None, None))

Uses a segmentation map to produce a mask covering field objects.

Parameters
do_not_mask: SkyCoord = ()

SkyCoord list of objects to keep unmasked; if any

ext: int = 0

threshold: float = 4

method: str = 'sep'

obj_value=1

The value to set object pixels to. For GALFIT masks, should be 1.

back_value=0

The value to set non-object pixels to. For GALFIT masks, should be 0.

margins: tuple = (None, None, None, None)

If only part of the image is to be masked, provide (left, right, bottom, top) in pixel coordinates as tuple.

Returns