* Enhancements for XFEL

* Enhancements for EIGER
* Writer is more flexible and capable of handling DECTRIS data
This commit is contained in:
2024-03-05 20:41:47 +01:00
parent 71d862b706
commit d315506633
165 changed files with 5440 additions and 2230 deletions

View File

@@ -208,4 +208,54 @@ TEST_CASE("DetectorGeometry_Custom", "[DetectorGeometry]") {
REQUIRE(geometry.GetSlowDirection(1).z == 0);
CHECK(geometry.GetSlowDirectionStep(2) == 1);
}
}
TEST_CASE("DetectorGeometry_Custom_Mirror", "[DetectorGeometry]") {
std::vector<DetectorModuleGeometry> module_geom;
REQUIRE_NOTHROW(module_geom.emplace_back(2999, 2999, DetectorModuleGeometry::Direction::Xneg,
DetectorModuleGeometry::Direction::Yneg));
REQUIRE_NOTHROW(module_geom.emplace_back(0, 0, DetectorModuleGeometry::Direction::Ypos,
DetectorModuleGeometry::Direction::Xpos));
REQUIRE_NOTHROW(module_geom.emplace_back(5000, 0, DetectorModuleGeometry::Direction::Ypos,
DetectorModuleGeometry::Direction::Xpos));
DetectorGeometry geometry(module_geom, true);
REQUIRE(geometry.GetModulesNum() == 3);
CHECK(geometry.GetHeight() == 2999+1);
CHECK(geometry.GetWidth() == 5513+1);
CHECK(geometry.GetPixel0(0) == 2999);
CHECK(geometry.GetPixel0(1) == 2999 * geometry.GetWidth());
CHECK(geometry.GetPixel0(2) == 2999 * geometry.GetWidth() + 5000 );
CHECK(geometry.GetFastDirectionStep(0) == -1);
REQUIRE(geometry.GetFastDirection(0).x == -1);
REQUIRE(geometry.GetFastDirection(0).y == 0);
REQUIRE(geometry.GetFastDirection(0).z == 0);
CHECK(geometry.GetFastDirectionStep(1) == -geometry.GetWidth());
REQUIRE(geometry.GetFastDirection(1).x == 0);
REQUIRE(geometry.GetFastDirection(1).y == -1);
REQUIRE(geometry.GetFastDirection(1).z == 0);
CHECK(geometry.GetFastDirectionStep(2) == -geometry.GetWidth());
CHECK(geometry.GetSlowDirectionStep(0) == geometry.GetWidth());
REQUIRE(geometry.GetSlowDirection(0).x == 0);
REQUIRE(geometry.GetSlowDirection(0).y == 1);
REQUIRE(geometry.GetSlowDirection(0).z == 0);
CHECK(geometry.GetSlowDirectionStep(1) == 1);
REQUIRE(geometry.GetSlowDirection(1).x == 1);
REQUIRE(geometry.GetSlowDirection(1).y == 0);
REQUIRE(geometry.GetSlowDirection(1).z == 0);
CHECK(geometry.GetSlowDirectionStep(2) == 1);
}