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(self, other[, inplace, …])

Rotate and truncate the segmap to match ‘other’.

cmap(self[, background_color])

matplotlib colormap with random colors.

copy(self)

get_mask(self, value[, dtype, dilate, …])

get_source_mask(self, iden, center, size[, …])

Methods Documentation

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

Rotate and truncate the segmap to match ‘other’.

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

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

copy(self)[source]
get_mask(self, value, dtype=<class 'numpy.uint8'>, dilate=None, inverse=False, struct=None, regrid_to=None, outname=None)[source]
get_source_mask(self, 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]