DBSCANGroup¶

class
photutils.psf.groupstars.
DBSCANGroup
(crit_separation, min_samples=1, metric='euclidean', algorithm='auto', leaf_size=30)[source]¶ Bases:
photutils.psf.groupstars.GroupStarsBase
Class to create star groups according to a distance criteria using the Densitybased Spatial Clustering of Applications with Noise (DBSCAN) from scikitlearn.
 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.
 min_samplesint, optional (default=1)
Minimum number of stars necessary to form a group.
 metricstring or callable (default=’euclidean’)
The metric to use when calculating distance between each pair of stars.
 algorithm{‘auto’, ‘ball_tree’, ‘kd_tree’, ‘brute’}, optional
The algorithm to be used to actually find nearest neighbors.
 leaf_sizeint, optional (default = 30)
Leaf size passed to BallTree or cKDTree.
Notes
The attribute
crit_separation
corresponds toeps
in sklearn.cluster.DBSCAN.This class provides more general algorithms than
photutils.psf.DAOGroup
. More precisely,photutils.psf.DAOGroup
is a special case ofphotutils.psf.DBSCANGroup
whenmin_samples=1
andmetric=euclidean
. Additionally,photutils.psf.DBSCANGroup
may be faster thanphotutils.psf.DAOGroup
.
References
 [1] Scikit Learn DBSCAN.
https://scikitlearn.org/stable/modules/generated/sklearn.cluster.DBSCAN.html#sklearn.cluster.DBSCAN
Methods Summary
group_stars
(starlist)Classify stars into groups.
Methods Documentation

group_stars
(starlist)[source]¶ Classify stars into groups.
 Parameters
 starlist
Table
List of star positions. Columns named as
x_0
andy_0
, which corresponds to the centroid coordinates of the sources, must be provided.
 starlist
 Returns
 group_starlist
Table
starlist
with an additional column namedgroup_id
whose unique values represent groups of mutually overlapping stars.
 group_starlist