segm_mask

petrofit.segmentation.segm_mask(source, segm, mask_background=False)[source]

Given a segmentation and a target with an label, returns a mask with all other sources masked in the original image.

Parameters:
sourcelist or int or photutils.segmentation.properties.SourceCatalog

The catalog object for the target or label of target in the segmentation object.

segmphotutils.segmentation.core.SegmentationImage

Segmentation image.

mask_backgroundbool

Option to also mask out all the un-segmented background pixels.

Returns:
maskbool array