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 Density-based Spatial Clustering of Applications with Noise (DBSCAN) from scikit-learn.

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

References

[1] Scikit Learn DBSCAN.

https://scikit-learn.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
starlistTable

List of star positions. Columns named as x_0 and y_0, which corresponds to the centroid coordinates of the sources, must be provided.

Returns
group_starlistTable

starlist with an additional column named group_id whose unique values represent groups of mutually overlapping stars.