source_detection#

stellarphot.photometry.source_detection.source_detection(ccd, fwhm=8, sigma=3.0, iters=5, threshold=10.0, find_fwhm=True, sky_per_pix_avg=0, padding=0)[source]#

Returns an SourceListData object containing the position of sources within the image identified using photutils.DAOStarFinder algorithm. It can also compute the FWHM of each source by fitting a 2D Gaussian which can be useful for choosing a useful aperture size for photometry.

Parameters:
ccdnumpy.ndarray or astropy.nddata.CCDData

This is the 2-D array of the image to be analyzed. If a CCDData object is passed, its data attribute will be used.

fwhmfloat, optional (default=8)

Initial estimate of full-width half-max of stars in the image, in pixels.

sigmafloat, optional. (default=3.0)

The number of standard deviations to use as the lower and upper clipping limit when calculating the image background.

itersint, optional (default=5)

The number of iterations to perform sigma clipping

thresholdfloat, optional. (default=10.0)

The number of standard deviations above which to select sources.

find_fwhmbool, optional (default=True)

If True, estimate the FWHM of each source by fitting a 2D Gaussian to it. If False, the ‘fwhm_x’, ‘fwhm_y’, and ‘width’ columns of output table will be filled with NaN values.

sky_per_pix_avgfloat or None, optional (default=None)

Sky background to subtract before centroiding. If set to None, it will be estimated using the mean of the sigma_clipped_stats of the image.

paddingint, optional (default=0)

Distance from the edge of the image to ignore when searching for sources.

Returns:
sources: stellardev.SourceListData

A table of the positions of sources in the image. If find_fwhm is True, includes columns for fwhm_x, fwhm_y, and `width. If the input CCDData object has WCS information, the columns ra and dec are also populated, otherwise they are set to NaN.