source_detection#
- stellarphot.photometry.source_detection.source_detection(ccd, fwhm=8, sigma=3.0, iters=5, threshold=10.0, stddev=None, find_fwhm=True, sky_per_pix_avg=0, padding=0, verbose=False)[source]#
Returns an SourceListData object containing the position of sources within the image identified using
photutils.DAOStarFinderalgorithm. 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:
- ccd
numpy.ndarrayorastropy.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.
- stddevfloat, optional
If provided, this value will be used as the standard deviation of the image. If not provided, the standard deviation will be calculated using
sigma_clipped_statson the image.- find_fwhmbool, optional (default=True)
If
True, estimate the FWHM of each source by fitting a 2D Gaussian to it. IfFalse, 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.
- verbosebool, optional
If
True, print additional information about the source detection process.
- ccd
- Returns:
- sources:
stellardev.SourceListData A table of the positions of sources in the image. If
find_fwhmisTrue, includes columns forfwhm_x,fwhm_y, and `width. If the input CCDData object has WCS information, the columnsraanddecare also populated, otherwise they are set to NaN.
- sources: