mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-09-08 08:02:38 +02:00
Dev/guess clusters (#355)
- exposing ClusterVector::empty in python - added member guess_n_clusters
This commit is contained in:
@@ -17,6 +17,8 @@ TEST_CASE("Read one frame from a cluster file", "[.with-data]") {
|
||||
REQUIRE(std::filesystem::exists(fpath));
|
||||
|
||||
ClusterFile<Cluster<int32_t, 3, 3>> f(fpath);
|
||||
CHECK(f.estimate_n_clusters() == 97);
|
||||
CHECK(f.tell() == 0);
|
||||
auto clusters = f.read_frame();
|
||||
CHECK(clusters.size() == 97);
|
||||
CHECK(clusters.frame_number() == 135);
|
||||
@@ -250,6 +252,8 @@ TEST_CASE("Read cluster from multiple frame file", "[.with-data]") {
|
||||
|
||||
SECTION("Read clusters from both frames") {
|
||||
ClusterFile<ClusterType> f(fpath);
|
||||
CHECK(f.estimate_n_clusters() == 8);
|
||||
CHECK(f.tell() == 0);
|
||||
auto clusters = f.read_clusters(2);
|
||||
REQUIRE(clusters.size() == 2);
|
||||
REQUIRE(clusters.frame_number() == 0);
|
||||
|
||||
Reference in New Issue
Block a user