ClusterVector¶
The ClusterVector, holds clusters from the ClusterFinder. Since it is templated
in C++ we use a suffix indicating the type of cluster it holds. The suffix follows
the same pattern as for ClusterFile i.e. ClusterVector_Cluster3x3i
for a vector holding 3x3 integer clusters.
At the moment the functionality from python is limited and it is not supported to push_back clusters to the vector. The intended use case is to pass it to C++ functions that support the ClusterVector or to view it as a numpy array.
View ClusterVector as numpy array
from aare import ClusterFile
with ClusterFile("path/to/file") as f:
cluster_vector = f.read_frame()
# Create a copy of the cluster data in a numpy array
clusters = np.array(cluster_vector)
# Avoid copying the data by passing copy=False
clusters = np.array(cluster_vector, copy = False)
- class aare._aare.ClusterVector_Cluster3x3i¶
Bases:
pybind11_object
- __init__(self: aare._aare.ClusterVector_Cluster3x3i) None ¶
- property capacity¶
- property cluster_size_x¶
- property cluster_size_y¶
- property fmt¶
- property frame_number¶
- item_size(self: aare._aare.ClusterVector_Cluster3x3i) int ¶
- push_back(self: aare._aare.ClusterVector_Cluster3x3i, arg0: aare::Cluster<int, (unsigned char)3, (unsigned char)3, unsigned short>) None ¶
- property size¶
- sum(self: aare._aare.ClusterVector_Cluster3x3i) numpy.ndarray ¶
- sum_2x2(self: aare._aare.ClusterVector_Cluster3x3i) numpy.ndarray ¶