RawToConvertedGeometry: Add function to calculate location of a raw pixel in converted geometry
This commit is contained in:
@@ -473,3 +473,10 @@ TEST_CASE("RawToConvertedGeometry_Gaps","[RawToConvertedGeometry]") {
|
||||
free(output);
|
||||
free(input2);
|
||||
}
|
||||
|
||||
TEST_CASE("RawToConvertedCoordinate","[RawToConvertedGeometry]") {
|
||||
DiffractionExperiment experiment(DetectorGeometry(4, 2, 8, 36, true));
|
||||
auto [x,y] = RawToConvertedCoordinate(experiment, 1, 300 * RAW_MODULE_COLS + 800);
|
||||
REQUIRE(x == CONVERTED_MODULE_COLS + 8 + 806); // col 800 becomes 806 due to 3 chip boundaries
|
||||
REQUIRE(y == CONVERTED_MODULE_LINES * 2 + 36 - 1 - 302); // line 300 becomes 302 due to 1 chip boundary
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user