v1.0.0-rc.103 (#8)
All checks were successful
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 7m51s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 7m19s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 7m46s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 8m32s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 8m6s
Build Packages / build:rpm (rocky8) (push) Successful in 8m7s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 7m37s
Build Packages / Generate python client (push) Successful in 17s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 32s
Build Packages / build:rpm (rocky9) (push) Successful in 9m6s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 6m53s
Build Packages / Unit tests (push) Successful in 1h9m39s
All checks were successful
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 7m51s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 7m19s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 7m46s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 8m32s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 8m6s
Build Packages / build:rpm (rocky8) (push) Successful in 8m7s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 7m37s
Build Packages / Generate python client (push) Successful in 17s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 32s
Build Packages / build:rpm (rocky9) (push) Successful in 9m6s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 6m53s
Build Packages / Unit tests (push) Successful in 1h9m39s
This is an UNSTABLE release. * jfjoch_viewer: Minor improvements to the viewer * jfjoch_broker: Change behavior for modular detectors: coordinates of 0-th pixel can be now arbitrary and detector will be cropped to the smallest rectangle limited by module coordinates Reviewed-on: #8 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #8.
This commit is contained in:
@@ -119,68 +119,53 @@ TEST_CASE("DetectorModuleGeometry_SameAxis", "[DetectorGeometry]") {
|
||||
DetectorModuleGeometry::Direction::Xpos));
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE("DetectorModuleGeometry_NoSpace", "[DetectorGeometry]") {
|
||||
std::unique_ptr<DetectorModuleGeometry> geometry;
|
||||
|
||||
REQUIRE_THROWS(geometry = std::make_unique<DetectorModuleGeometry>(1022,0,
|
||||
DetectorModuleGeometry::Direction::Xneg,
|
||||
DetectorModuleGeometry::Direction::Ypos));
|
||||
|
||||
REQUIRE_THROWS(geometry = std::make_unique<DetectorModuleGeometry>(1022,512,
|
||||
DetectorModuleGeometry::Direction::Xpos,
|
||||
DetectorModuleGeometry::Direction::Yneg));
|
||||
|
||||
REQUIRE_THROWS(geometry = std::make_unique<DetectorModuleGeometry>(1029,513,
|
||||
DetectorModuleGeometry::Direction::Yneg,
|
||||
DetectorModuleGeometry::Direction::Xneg));
|
||||
|
||||
REQUIRE_NOTHROW(geometry = std::make_unique<DetectorModuleGeometry>(1029,513,
|
||||
DetectorModuleGeometry::Direction::Xneg,
|
||||
DetectorModuleGeometry::Direction::Yneg));
|
||||
|
||||
REQUIRE_NOTHROW(geometry = std::make_unique<DetectorModuleGeometry>(513,1029,
|
||||
DetectorModuleGeometry::Direction::Yneg,
|
||||
DetectorModuleGeometry::Direction::Xneg));
|
||||
}
|
||||
|
||||
TEST_CASE("DetectorModuleGeometry_GetMaxX_GetMaxY", "[DetectorGeometry]") {
|
||||
std::unique_ptr<DetectorModuleGeometry> geometry;
|
||||
|
||||
REQUIRE_NOTHROW(geometry = std::make_unique<DetectorModuleGeometry>(0,0,
|
||||
DetectorModuleGeometry::Direction::Xpos,
|
||||
DetectorModuleGeometry::Direction::Ypos));
|
||||
CHECK(geometry->GetMinX() == 0);
|
||||
CHECK(geometry->GetMaxX() == 1029);
|
||||
|
||||
REQUIRE(geometry->GetMaxX() == 1029);
|
||||
REQUIRE(geometry->GetMaxY() == 513);
|
||||
CHECK(geometry->GetMinY() == 0);
|
||||
CHECK(geometry->GetMaxY() == 513);
|
||||
|
||||
REQUIRE_NOTHROW(geometry = std::make_unique<DetectorModuleGeometry>(2029,1513,
|
||||
DetectorModuleGeometry::Direction::Xneg,
|
||||
DetectorModuleGeometry::Direction::Yneg));
|
||||
CHECK(geometry->GetMinX() == 2029 - 1029);
|
||||
CHECK(geometry->GetMaxX() == 2029);
|
||||
|
||||
REQUIRE(geometry->GetMaxX() == 2029);
|
||||
REQUIRE(geometry->GetMaxY() == 1513);
|
||||
CHECK(geometry->GetMinY() == 1513 - 513);
|
||||
CHECK(geometry->GetMaxY() == 1513);
|
||||
|
||||
REQUIRE_NOTHROW(geometry = std::make_unique<DetectorModuleGeometry>(2029,1513,
|
||||
DetectorModuleGeometry::Direction::Yneg,
|
||||
DetectorModuleGeometry::Direction::Xneg));
|
||||
CHECK(geometry->GetMinX() == 2029 - 513);
|
||||
CHECK(geometry->GetMaxX() == 2029);
|
||||
|
||||
REQUIRE(geometry->GetMaxX() == 2029);
|
||||
REQUIRE(geometry->GetMaxY() == 1513);
|
||||
CHECK(geometry->GetMinY() == 1513 - 1029);
|
||||
CHECK(geometry->GetMaxY() == 1513);
|
||||
|
||||
REQUIRE_NOTHROW(geometry = std::make_unique<DetectorModuleGeometry>(2029,1513,
|
||||
DetectorModuleGeometry::Direction::Yneg,
|
||||
DetectorModuleGeometry::Direction::Xpos));
|
||||
CHECK(geometry->GetMinX() == 2029);
|
||||
CHECK(geometry->GetMaxX() == 2029 + 513);
|
||||
|
||||
REQUIRE(geometry->GetMaxX() == 2029 + 513);
|
||||
REQUIRE(geometry->GetMaxY() == 1513);
|
||||
CHECK(geometry->GetMinY() == 1513 - 1029);
|
||||
CHECK(geometry->GetMaxY() == 1513);
|
||||
|
||||
REQUIRE_NOTHROW(geometry = std::make_unique<DetectorModuleGeometry>(2029,1513,
|
||||
DetectorModuleGeometry::Direction::Ypos,
|
||||
DetectorModuleGeometry::Direction::Xneg));
|
||||
CHECK(geometry->GetMinX() == 2029 - 513);
|
||||
CHECK(geometry->GetMaxX() == 2029);
|
||||
|
||||
REQUIRE(geometry->GetMaxX() == 2029);
|
||||
REQUIRE(geometry->GetMaxY() == 1513 + 1029);
|
||||
CHECK(geometry->GetMinY() == 1513);
|
||||
CHECK(geometry->GetMaxY() == 1513 + 1029);
|
||||
}
|
||||
|
||||
TEST_CASE("DetectorGeometryModular_Custom", "[DetectorGeometry]") {
|
||||
@@ -199,7 +184,6 @@ TEST_CASE("DetectorGeometryModular_Custom", "[DetectorGeometry]") {
|
||||
|
||||
REQUIRE(geometry.GetModulesNum() == 3);
|
||||
|
||||
|
||||
CHECK(geometry.GetHeight(true) == 2999+1);
|
||||
CHECK(geometry.GetWidth(true) == 5513+1);
|
||||
CHECK(geometry.GetPixel0(0, true) == 2999 * geometry.GetWidth(true) + 2999);
|
||||
@@ -234,6 +218,22 @@ TEST_CASE("DetectorGeometryModular_Custom", "[DetectorGeometry]") {
|
||||
CHECK(geometry.GetSlowDirectionStep(2) == 1);
|
||||
}
|
||||
|
||||
TEST_CASE("DetectorGeometryModular_Limit", "[DetectorGeometry]") {
|
||||
std::vector<DetectorModuleGeometry> module_geom;
|
||||
|
||||
REQUIRE_NOTHROW(module_geom.emplace_back(-100, 2999, DetectorModuleGeometry::Direction::Xneg,
|
||||
DetectorModuleGeometry::Direction::Yneg));
|
||||
|
||||
REQUIRE_NOTHROW(module_geom.emplace_back(5000, 500, DetectorModuleGeometry::Direction::Ypos,
|
||||
DetectorModuleGeometry::Direction::Xpos));
|
||||
|
||||
DetectorGeometryModular geometry(module_geom);
|
||||
|
||||
REQUIRE(geometry.GetModulesNum() == 2);
|
||||
CHECK(geometry.GetWidth(true) == 5000 + 514 - (-100 - 1030) - 1);
|
||||
CHECK(geometry.GetHeight(true) == 2999 - 500 + 1);
|
||||
}
|
||||
|
||||
TEST_CASE("DetectorGeometryModular_Custom_Mirror", "[DetectorGeometry]") {
|
||||
std::vector<DetectorModuleGeometry> module_geom;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user