make_catalog
- petrofit.segmentation.make_catalog(image, threshold, wcs=None, deblend=True, npixels=None, nlevels=30, contrast=0.001, plot=True, vmax=None, vmin=None, figsize=None)[source]
This function constructs a catalog using
PhotUtils. Thepetrofit.segmentation.make_segmentsandpetrofit.segmentation.deblend_segmentsfunctions are used to construct segmentation maps and the resulting segmentation is turned into a vatalog (photutils.segmentation.catalog.SourceCatalog)- Parameters:
- imagearray like
Input image.
- thresholdfloat or array-like
The data value or pixel-wise data values to be used for the detection threshold. A 2D
thresholdmust have the same shape asdata. Seedetect_thresholdfor one way to create athresholdimage.- wcsastropy.wcs.WCS
Astropy WCS for catalog to convert source locations to RA-Dec.
- deblendbool
Flag to enable deblending of sources in the segmentation map.
- npixelsint
The number of connected pixels, each greater than
threshold, that an object must have to be detected.npixelsmust be a positive integer.- nlevelsint, optional
The number of multi-thresholding levels to use. Each source will be re-thresholded at
nlevelslevels spaced exponentially or linearly (see themodekeyword) between its minimum and maximum values within the source segment.- contrastfloat, optional
The fraction of the total (blended) source flux that a local peak must have (at any one of the multi-thresholds) to be considered as a separate object.
contrastmust be between 0 and 1, inclusive. Ifcontrast = 0then every local peak will be made a separate object (maximum deblending). Ifcontrast = 1then no deblending will occur. The default is 0.001, which will deblend sources with a 7.5 magnitude difference.- plotbool
Flag to toggle plotting segmentation maps.
- vmin, vmaxfloat
vmax and vmin values for plot.
- figsizetuple
Figure size.
- Returns:
- cat, segm, segm_deblend
- cat
photutils.segmentation.catalog.SourceCatalog A catalog of sources
- segm
photutils.segmentation.core.SegmentationImage Segmentation map.
- segm_deblend
photutils.segmentation.core.SegmentationImage Deblended segmentation map.
- cat