clustering — Clustering facilities#
Module documentation#
Clustering facilities.
- class hexsample.clustering.Cluster(x: ndarray, y: ndarray, pha: ndarray)[source]#
Small container class describing a cluster.
- x: ndarray#
- y: ndarray#
- pha: ndarray#
- class hexsample.clustering.ClusteringBase(grid: HexagonalGrid, zero_sup_threshold: float)[source]#
Base class for the clustering.
- grid: HexagonalGrid#
- zero_sup_threshold: float#
- run(event: DigiEventRectangular) Cluster[source]#
Workhorse method to be reimplemented by derived classes.
- class hexsample.clustering.ClusteringNN(grid: HexagonalGrid, zero_sup_threshold: float, num_neighbors: int)[source]#
Neirest neighbor clustering.
This is a very simple clustering strategy where we use the highest pixel in the event as a seed, loop over the six neighbors (after the zero suppression) and keep the N highest pixels.
Arguments#
- num_neighborsint
The number of neighbors (between 0 and 6) to include in the cluster.
- num_neighbors: int#