Segmap

class mpdaf.sdetect.Segmap(file_or_image, cut_header_after='D001VER')[source]

Bases: object

Handle segmentation maps, where pixel values are sources ids.

Methods Summary

align_with_image(other[, inplace, truncate, ...])

Rotate and truncate the segmap to match 'other'.

cmap([background_color])

matplotlib colormap with random colors.

copy()

get_mask(value[, dtype, dilate, inverse, ...])

get_source_mask(iden, center, size[, ...])

Methods Documentation

align_with_image(other, inplace=False, truncate=False, margin=0)[source]

Rotate and truncate the segmap to match ‘other’.

cmap(background_color='#000000')[source]

matplotlib colormap with random colors. (taken from photutils’ segmentation map class)

copy()[source]
get_mask(value, dtype=<class 'numpy.uint8'>, dilate=None, inverse=False, struct=None, regrid_to=None, outname=None)[source]
get_source_mask(iden, center, size, minsize=None, dilate=None, dtype=<class 'numpy.uint8'>, struct=None, unit_center=Unit("deg"), unit_size=Unit("arcsec"), regrid_to=None, outname=None)[source]