added support for eiger quad
Build on RHEL9 / build (push) Successful in 2m29s
Build on RHEL8 / build (push) Successful in 3m5s
Run tests using data on local RHEL8 / build (push) Failing after 3m55s

This commit is contained in:
2026-08-06 15:05:44 +02:00
parent 24db50e9d1
commit 562b4caac9
3 changed files with 43 additions and 1 deletions
+3 -1
View File
@@ -178,7 +178,9 @@ std::vector<ROI> get_rois_from_disabled_udp_ports(
if (udp_port_types == std::vector<std::string>{"left", "right"}) {
rois = merge_consecutive_rois<false, true>(rois);
} else if (udp_port_types ==
std::vector<std::string>{"bottom", "top"}) {
std::vector<std::string>{"bottom", "top"} ||
udp_port_types ==
std::vector<std::string>{"top", "bottom"}) {
LOG(logDEBUG) << fmt::format("ROIs before merging: {}",
rois.size());
+36
View File
@@ -537,4 +537,40 @@ TEST_CASE("Read Eiger frame with disabled UDP ports",
REQUIRE(frame.cols() == 512);
REQUIRE(frame.rows() == 512);
}
SECTION("2 full modules stacked vertically - right ports disabled") {
auto fpath = test_data_path() / "raw/eiger" /
"2_modules_eiger_disabled_udp_port_master_0.json";
REQUIRE(std::filesystem::exists(fpath));
RawFile f(fpath);
REQUIRE(f.master().disabled_udp_ports().value() ==
std::vector<size_t>{1, 3, 5, 7});
REQUIRE(f.master().udp_port_types().value() ==
std::vector<std::string>{"left", "right"});
REQUIRE_THROWS_WITH(
f.read_frame(),
Catch::Matchers::ContainsSubstring(
"Multiple ROIs present in file. Use read_ROIs() "
"instead"));
auto frames = f.read_rois();
REQUIRE(frames.size() == 2);
REQUIRE(frames[0].cols() == 512);
REQUIRE(frames[0].rows() == 512);
REQUIRE(frames[1].cols() == 512);
REQUIRE(frames[1].rows() == 512);
}
SECTION("quad module - bottom port disabled") {
auto fpath = test_data_path() / "raw/eiger" /
"quad_eiger_disabled_bottom_port_master_0.json";
REQUIRE(std::filesystem::exists(fpath));
RawFile f(fpath);
REQUIRE(f.master().disabled_udp_ports().value() ==
std::vector<size_t>{1});
REQUIRE(f.master().udp_port_types().value() ==
std::vector<std::string>{"top", "bottom"});
auto frame = f.read_frame();
REQUIRE(frame.cols() == 512);
REQUIRE(frame.rows() == 256);
}
}
+4
View File
@@ -115,6 +115,10 @@ RawMasterFile::RawMasterFile(const std::filesystem::path &fpath)
} else {
throw std::runtime_error(LOCATION + "Unsupported file type");
}
if (m_quad == 1 && m_udp_port_types.has_value()) {
m_udp_port_types.value() = {"top", "bottom"};
}
}
RawMasterFile::RawMasterFile(std::istream &is, const std::string &fname)