xpipe.xhandle.parbins.assign_kmeans_labels¶
- xpipe.xhandle.parbins.assign_kmeans_labels(pos, centers, verbose=False)[source]¶
Defines 2D patches on the sky via spherical k-means
- Parameters
pos (np.ndarray) – positions of points in (RA, DEC)
centers (int or np.ndarray) – Number of centers to use, or the (RA, DEC) coordinates of the centers
verbose (bool) – verbose flag to pass to kmeans_radec
- Returns
K-means labels
K-means centers
- Return type
np.array, np.ndarray