class photutils.psf.DAOPhotPSFPhotometry(crit_separation, threshold, fwhm, psf_model, fitshape, sigma=3.0, ratio=1.0, theta=0.0, sigma_radius=1.5, sharplo=0.2, sharphi=1.0, roundlo=-1.0, roundhi=1.0, fitter=<astropy.modeling.fitting.LevMarLSQFitter object>, niters=3, aperture_radius=None, extra_output_cols=None)[source]

Bases: photutils.psf.IterativelySubtractedPSFPhotometry

This class implements an iterative algorithm based on the DAOPHOT algorithm presented by Stetson (1987) to perform point spread function photometry in crowded fields. This consists of applying a loop of find sources, make groups, fit groups, subtract groups, and then repeat until no more stars are detected or a given number of iterations is reached.

Basically, this classes uses IterativelySubtractedPSFPhotometry, but with grouping, finding, and background estimation routines defined a priori. More precisely, this class uses DAOGroup for grouping, DAOStarFinder for finding sources, and MMMBackground for background estimation. Those classes are based on GROUP, FIND, and SKY routines used in DAOPHOT, respectively.

The parameter crit_separation is associated with DAOGroup. sigma_clip is associated with MMMBackground. threshold and fwhm are associated with DAOStarFinder. Parameters from ratio to roundhi are also associated with DAOStarFinder.

crit_separationfloat or int

Distance, in units of pixels, such that any two stars separated by less than this distance will be placed in the same group.


The absolute image value above which to select sources.


The full-width half-maximum (FWHM) of the major axis of the Gaussian kernel in units of pixels.

psf_modelastropy.modeling.Fittable2DModel instance

PSF or PRF model to fit the data. Could be one of the models in this package like DiscretePRF, IntegratedGaussianPRF, or any other suitable 2D model. This object needs to identify three parameters (position of center in x and y coordinates and the flux) in order to set them to suitable starting values for each fit. The names of these parameters should be given as x_0, y_0 and flux. prepare_psf_model can be used to prepare any 2D model to match this assumption.

fitshapeint or length-2 array-like

Rectangular shape around the center of a star which will be used to collect the data to do the fitting. Can be an integer to be the same along both axes. For example, 5 is the same as (5, 5), which means to fit only at the following relative pixel positions: [-2, -1, 0, 1, 2]. Each element of fitshape must be an odd number.

sigmafloat, optional

Number of standard deviations used to perform sigma clip with a astropy.stats.SigmaClip object.

ratiofloat, optional

The ratio of the minor to major axis standard deviations of the Gaussian kernel. ratio must be strictly positive and less than or equal to 1.0. The default is 1.0 (i.e., a circular Gaussian kernel).

thetafloat, optional

The position angle (in degrees) of the major axis of the Gaussian kernel measured counter-clockwise from the positive x axis.

sigma_radiusfloat, optional

The truncation radius of the Gaussian kernel in units of sigma (standard deviation) [1 sigma = FWHM / (2.0*sqrt(2.0*log(2.0)))].

sharplofloat, optional

The lower bound on sharpness for object detection.

sharphifloat, optional

The upper bound on sharpness for object detection.

roundlofloat, optional

The lower bound on roundess for object detection.

roundhifloat, optional

The upper bound on roundess for object detection.

fitterFitter instance

Fitter object used to compute the optimized centroid positions and/or flux of the identified sources. See fitting for more details on fitters.

nitersint or None

Number of iterations to perform of the loop FIND, GROUP, SUBTRACT, NSTAR. If None, iterations will proceed until no more stars remain. Note that in this case it is possible that the loop will never end if the PSF has structure that causes subtraction to create new sources infinitely.


The radius (in units of pixels) used to compute initial estimates for the fluxes of sources. If None, one FWHM will be used if it can be determined from the `psf_model.

extra_output_colslist of str, optional

List of additional columns for parameters derived by any of the intermediate fitting steps (e.g., finder), such as roundness or sharpness.


If there are problems with fitting large groups, change the parameters of the grouping algorithm to reduce the number of sources in each group or input a star_groups table that only includes the groups that are relevant (e.g., manually remove all entries that coincide with artifacts).


[1] Stetson, Astronomical Society of the Pacific, Publications,

(ISSN 0004-6280), vol. 99, March 1987, p. 191-222. Available at: https://ui.adsabs.harvard.edu/abs/1987PASP…99..191S/abstract