mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-11 06:47:14 +02:00
summing 2x2
This commit is contained in:
@ -10,16 +10,18 @@ import time
|
||||
|
||||
from aare import File, ClusterFinder, VarClusterFinder, ClusterFile
|
||||
|
||||
base = Path('/mnt/sls_det_storage/matterhorn_data/aare_test_data/')
|
||||
base = Path('/mnt/sls_det_storage/matterhorn_data/aare_test_data/ci/aare_test_data/clusters/')
|
||||
|
||||
f = File(base/'Moench03new/cu_half_speed_master_4.json')
|
||||
f = ClusterFile(base/'beam_En700eV_-40deg_300V_10us_d0_f0_100.clust')
|
||||
|
||||
for i, frame in enumerate(f):
|
||||
print(f'{i}', end='\r')
|
||||
print()
|
||||
c = f.read_clusters(100)
|
||||
|
||||
# for i, frame in enumerate(f):
|
||||
# print(f'{i}', end='\r')
|
||||
# print()
|
||||
|
||||
|
||||
from aare._aare import ClusterFinderMT, ClusterCollector, ClusterFileSink
|
||||
# from aare._aare import ClusterFinderMT, ClusterCollector, ClusterFileSink
|
||||
|
||||
|
||||
# cf = ClusterFinderMT((400,400), (3,3), n_threads = 3)
|
||||
|
@ -34,6 +34,10 @@ void define_cluster_vector(py::module &m, const std::string &typestr) {
|
||||
auto *vec = new std::vector<T>(self.sum());
|
||||
return return_vector(vec);
|
||||
})
|
||||
.def("sum_2x2", [](ClusterVector<T> &self) {
|
||||
auto *vec = new std::vector<T>(self.sum_2x2());
|
||||
return return_vector(vec);
|
||||
})
|
||||
.def_property_readonly("capacity", &ClusterVector<T>::capacity)
|
||||
.def_property("frame_number", &ClusterVector<T>::frame_number,
|
||||
&ClusterVector<T>::set_frame_number)
|
||||
|
Reference in New Issue
Block a user