Bragg integration: option to use azimuthal integration profile

This commit is contained in:
2026-06-10 14:41:36 +02:00
parent e051eed033
commit e4230bc14e
15 changed files with 218 additions and 115 deletions
+5 -1
View File
@@ -59,6 +59,10 @@ TEST_CASE("BraggIntegrate2D_RejectsReflectionsFromBackgroundUsingR2MaskAndMedian
Reflection r1 = MakeReflection(10.0f, 10.0f);
Reflection r2 = MakeReflection(16.0f, 10.0f);
PixelMask mask(experiment);
AzimuthalIntegrationMapping mapping(experiment, mask);
AzimuthalIntegrationProfile profile(mapping);
for (int y = 0; y < static_cast<int>(height); y++) {
for (int x = 0; x < static_cast<int>(width); x++) {
auto &pixel = image_data[y * width + x];
@@ -74,7 +78,7 @@ TEST_CASE("BraggIntegrate2D_RejectsReflectionsFromBackgroundUsingR2MaskAndMedian
CompressedImage image(image_data, width, height);
std::vector<Reflection> predicted = {r1, r2};
auto integrated = BraggIntegrate2D(experiment, image, predicted, predicted.size(), 17);
auto integrated = BraggIntegrate2D(experiment, image, predicted, mapping, profile, predicted.size(), 17);
REQUIRE(integrated.size() == 2);