DAOPhotPSFPhotometry¶
- 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, subshape=None)[source]¶
Bases:
IterativelySubtractedPSFPhotometry
Deprecated since version 1.9.0: The DAOPhotPSFPhotometry class is deprecated and may be removed in a future version. Use
photutils.psf.IterativePSFPhotometry
instead.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 usesDAOGroup
for grouping,DAOStarFinder
for finding sources, andMMMBackground
for background estimation. Those classes are based on GROUP, FIND, and SKY routines used in DAOPHOT, respectively.The parameter
crit_separation
is associated withDAOGroup
.sigma_clip
is associated withMMMBackground
.threshold
andfwhm
are associated withDAOStarFinder
. Parameters fromratio
toroundhi
are also associated withDAOStarFinder
.- Parameters:
- 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.
- thresholdfloat
The absolute image value above which to select sources.
- fwhmfloat
The full-width half-maximum (FWHM) of the major axis of the Gaussian kernel in units of pixels.
- psf_model
astropy.modeling.Fittable2DModel
instance PSF or PRF model to fit the data. Could be one of the models in this package like
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 asx_0
,y_0
andflux
.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 that will be used to define the PSF-fitting region. If
fitshape
is a scalar then a square shape of sizefitshape
will be used. Iffitshape
has two elements, they must be in(ny, nx)
order. Each element offitshape
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.
- fitter
Fitter
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.
- aperture_radiusfloat
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.- subshape
None
, int, or length-2 array_like Rectangular shape around the center of a star that will be used to define the PSF-subtraction region. If
None
, thenfitshape
will be used. Ifsubshape
is a scalar then a square shape of sizesubshape
will be used. Ifsubshape
has two elements, they must be in(ny, nx)
order. Each element ofsubshape
must be an odd number.
Notes
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).References
- [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
Deprecated since version 1.9.0: The DAOPhotPSFPhotometry class is deprecated and may be removed in a future version. Use
photutils.psf.IterativePSFPhotometry
instead.