segfind#

astropop.photometry.segfind(data, threshold, background, noise, mask=None, fwhm=None, npix=5, deblend=True)#

Find sources using segmentation.

Parameters:
data: array_like

2D array containing the image to extract the sources.

threshold: `int` or `float`

Minumim number of standard deviations above the background level where the algorithm will start to consider the sources.

background: `float` or `~numpy.ndarray`

Background level estimation. Can be a single global value, or a 2D array with by-pixel values.

noise: `float` or `~numpy.ndarray`

RMS or any other noise estimation to use in the detection. Can be a single global value, or a 2D array with by-pixel values.

mask: array_like (optional)

Boolean mask where 1 pixels are masked out in the background calculation. Default: None

fwhm: `float` (optional)

FWHM to generate the convolution kernel. If None, no convolution will be performed. Default: None

npix: `int` (optional)

Minimum number of connected pixels to consider a source. Default: 5

deblend: `bool` (optional)

If True, the algorithm will try to deblend the sources. Default: True

Returns:
sources: astropy.table.Table

Table with the sources found. The table will contain the following columns: - id: source ID - x, y: x and y coordinates of the source centroid - xcentroid, ycentroid: same as x and y - peak: value of the source peak - flux: integrated (background-subtracted) source flux within the

segment

  • sigma_x, sigma_y: standard deviation of the source elipsoid along x and y

  • theta: rotation angle of the source elipsoid (degrees) from the positive x axis

  • fwhm: FWHM of circular gaussian fit of the source

  • eccentricity: The eccentricity of the 2D Gaussian function that has the same second-order moments as the source.

  • elongation: The ratio of the lengths of the semimajor and semiminor axes.

  • ellipticity: 1.0 minus the elongation.

  • cxx, cyy, cxy: SourceExtractor ellipse parameters. See [SourceExtractor docs]_

  • area: area of the segment, in pixels

  • label: label identifying the segment to which the source belongs. Can be used as y-sorted index.

References