From 406c4069887a198bd8998eac7ace003af8885f91 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Fri, 31 Jul 2026 13:31:34 +0200 Subject: [PATCH] Bragg prediction: one limit per index, not one cube Each Miller index is bounded by its OWN axis - |h| <= a/d_min, |k| <= b/d_min, |l| <= c/d_min - so a single half-width has to be sized for the longest axis and then walks the short ones far past anything the resolution cut can keep. Give the predictor max_h, max_k and max_l instead, in all four implementations (CPU and GPU, stills and rotation), and derive each from its own axis. On a 149/83/226 A cell that is 23.1M candidates per frame instead of 94.2M, 4.1x fewer. Results are bit-identical, as they must be - the candidates removed are only ones the |q| <= 1/d_min cut rejected anyway: over six rotation crystals every merged observation count, high-shell CC1/2 and space group matches the cube exactly, 6/6 space groups correct. It buys almost no time, and the earlier claim that the cube cost 22% of that crystal's wall clock was wrong. Removing 4.1x of the candidates moves it 1m58s -> 1m57s, so the whole prediction sweep is ~1% of the run. The 22% that crystal costs relative to a fixed max_hkl of 100 is genuine extra work at max_l = 227: real reflections inside the resolution sphere along the long axis, predicted and integrated either way. Per-axis limits do not reduce that and cannot. The user-facing setting stays a single number: it exists to bound the work, not to describe the crystal, and applies to all three indices when set. Co-Authored-By: Claude Opus 5 (1M context) --- image_analysis/IndexAndRefine.cpp | 45 +++++++++-------- .../bragg_prediction/BraggPrediction.cpp | 6 +-- .../bragg_prediction/BraggPrediction.h | 8 ++- .../bragg_prediction/BraggPredictionGPU.cu | 24 ++++----- .../bragg_prediction/BraggPredictionRot.cpp | 6 +-- .../bragg_prediction/BraggPredictionRotGPU.cu | 24 ++++----- tests/CalcBraggPredictionTest.cpp | 50 +++++++++---------- tests/IndexingUnitTest.cpp | 6 +-- 8 files changed, 87 insertions(+), 82 deletions(-) diff --git a/image_analysis/IndexAndRefine.cpp b/image_analysis/IndexAndRefine.cpp index 874ae3ac..a6655a4f 100644 --- a/image_analysis/IndexAndRefine.cpp +++ b/image_analysis/IndexAndRefine.cpp @@ -22,29 +22,32 @@ namespace { // so this bounds the pathological case rather than the normal one. constexpr int OFFLINE_REFINE_ITERATIONS = 50; - // How far the predictor has to walk the lattice for THIS crystal. The predictor keeps only + // How far the predictor has to walk each index for THIS crystal. The predictor keeps only // reflections with |q| <= 1/d_min, and h = a.q for the real-space axis a, so |h| <= a/d_min exactly - // (Cauchy-Schwarz, equality when a lies along q); the same for k and l. Walking beyond - // max(a,b,c)/d_min therefore generates only candidates the resolution cut throws away, and stopping - // short of it silently truncates the outermost reflections of the longest axis. - // - // A fixed bound cannot be right for both: 100 covers a 150 A axis at 1.5 A and truncates the same - // axis at 1.0 A, while being ~4x more cube than a small cell at 2 A ever needs. One index of margin - // covers the rounding. - int MaxHKLForCell(const CrystalLattice &latt, float d_min_A) { - const UnitCell cell = latt.GetUnitCell(); - const float longest_axis_A = std::max({cell.a, cell.b, cell.c}); - return static_cast(std::ceil(longest_axis_A / d_min_A)) + 1; + // (Cauchy-Schwarz, equality when a lies along q) - and independently |k| <= b/d_min, |l| <= c/d_min. + // Each index is therefore bounded by its OWN axis, which is why the limits are per-axis: a single + // cube would have to be sized for the longest axis and would walk the short ones far past anything + // the resolution cut can keep. One index of margin covers the rounding. + int MaxIndexForAxis(float axis_A, float d_min_A) { + return static_cast(std::ceil(axis_A / d_min_A)) + 1; } - // An explicit setting is enforced as given; otherwise the cell decides. The online path carries a - // value (the broker bootstraps one and the API can change it), so live acquisition never has its - // per-frame cost decided by the crystal that happened to be mounted. - int PredictionMaxHKL(const DiffractionExperiment &experiment, const CrystalLattice &latt) { + // An explicit setting is enforced as given, on every index - it is one number, deliberately, because + // it exists to bound the work rather than to describe the crystal. Otherwise the cell decides. The + // online path always carries a value (the broker bootstraps one and the API can change it), so a + // live acquisition never has its per-frame cost decided by whichever crystal was mounted. + void ApplyPredictionRange(BraggPredictionSettings &settings, const DiffractionExperiment &experiment, + const CrystalLattice &latt) { const auto &bragg = experiment.GetBraggIntegrationSettings(); - if (const auto fixed = bragg.GetMaxHKL()) - return *fixed; - return MaxHKLForCell(latt, bragg.GetDMinLimit_A()); + if (const auto fixed = bragg.GetMaxHKL()) { + settings.max_h = settings.max_k = settings.max_l = *fixed; + return; + } + const UnitCell cell = latt.GetUnitCell(); + const float d_min_A = bragg.GetDMinLimit_A(); + settings.max_h = MaxIndexForAxis(cell.a, d_min_A); + settings.max_k = MaxIndexForAxis(cell.b, d_min_A); + settings.max_l = MaxIndexForAxis(cell.c, d_min_A); } } @@ -462,10 +465,9 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg, .image_scale_cc = msg.image_scale_cc, }; - const BraggPredictionSettings settings_prediction{ + BraggPredictionSettings settings_prediction{ .high_res_A = experiment.GetBraggIntegrationSettings().GetDMinLimit_A(), .ewald_dist_cutoff = ewald_dist_cutoff, - .max_hkl = PredictionMaxHKL(experiment, latt), // Centering is a hypothesis to confirm, not assume: with no user-fixed space group, predict // in P so the centering-absent reflections are integrated and the space-group search can // confirm or disprove centering (and catch a missed superstructure). A user-fixed space @@ -476,6 +478,7 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg, // FWHM -> sigma; 0 when monochromatic, leaving the prediction unchanged. .bandwidth_sigma = experiment.GetBandwidthFWHM().value_or(0.0f) / 2.3548f, }; + ApplyPredictionRange(settings_prediction, experiment, latt); // Predict, then integrate with the selected integrator (box-sum or profile-fit). auto pred_start_time = std::chrono::steady_clock::now(); diff --git a/image_analysis/bragg_prediction/BraggPrediction.cpp b/image_analysis/bragg_prediction/BraggPrediction.cpp index f757bd70..f18a95be 100644 --- a/image_analysis/bragg_prediction/BraggPrediction.cpp +++ b/image_analysis/bragg_prediction/BraggPrediction.cpp @@ -74,19 +74,19 @@ int BraggPrediction::Calc(const DiffractionExperiment &experiment, const Crystal int i = 0; - for (int h = -settings.max_hkl; h <= settings.max_hkl; h++) { + for (int h = -settings.max_h; h <= settings.max_h; h++) { // Precompute A* h contribution const float Ah_x = Astar.x * h; const float Ah_y = Astar.y * h; const float Ah_z = Astar.z * h; - for (int k = -settings.max_hkl; k <= settings.max_hkl; k++) { + for (int k = -settings.max_k; k <= settings.max_k; k++) { // Accumulate B* k contribution const float AhBk_x = Ah_x + Bstar.x * k; const float AhBk_y = Ah_y + Bstar.y * k; const float AhBk_z = Ah_z + Bstar.z * k; - for (int l = -settings.max_hkl; l <= settings.max_hkl; l++) { + for (int l = -settings.max_l; l <= settings.max_l; l++) { if (systematic_absence(h, k, l, settings.centering)) continue; diff --git a/image_analysis/bragg_prediction/BraggPrediction.h b/image_analysis/bragg_prediction/BraggPrediction.h index d9a8350e..f71948dd 100644 --- a/image_analysis/bragg_prediction/BraggPrediction.h +++ b/image_analysis/bragg_prediction/BraggPrediction.h @@ -12,7 +12,13 @@ struct BraggPredictionSettings { float high_res_A = 1.5; float ewald_dist_cutoff = 0.0005; - int max_hkl = 100; + // Per-index half-widths of the box the predictor walks: h runs -max_h..+max_h, and so on. One limit + // per axis rather than one cube, because each index is bounded by its OWN axis (|h| <= a/d_min), so + // a cube sized for the longest axis walks the short ones far past anything the resolution cut can + // keep - on a 149/83/226 A cell that is ~16x the candidates a per-axis box generates. + int max_h = 100; + int max_k = 100; + int max_l = 100; char centering = 'P'; float wedge_deg = 0.1f; float mosaicity_deg = 0.2f; diff --git a/image_analysis/bragg_prediction/BraggPredictionGPU.cu b/image_analysis/bragg_prediction/BraggPredictionGPU.cu index 37bfd583..87a0b397 100644 --- a/image_analysis/bragg_prediction/BraggPredictionGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionGPU.cu @@ -135,18 +135,17 @@ namespace { } __global__ void bragg_kernel_3d(const KernelConsts *__restrict__ kc, - int max_hkl, + int max_h, int max_k, int max_l, int max_reflections, Reflection *__restrict__ out, int *__restrict__ counter) { - int range = 2 * max_hkl + 1; int hi = blockIdx.x * blockDim.x + threadIdx.x; int ki = blockIdx.y * blockDim.y + threadIdx.y; int li = blockIdx.z * blockDim.z + threadIdx.z; - if (hi >= range || ki >= range || li >= range) return; - int h = hi - max_hkl; - int k = ki - max_hkl; - int l = li - max_hkl; + if (hi > 2 * max_h || ki > 2 * max_k || li > 2 * max_l) return; + int h = hi - max_h; + int k = ki - max_k; + int l = li - max_l; Reflection r{}; if (!compute_reflection(*kc, h, k, l, r)) return; // See the rotation kernel: clamping the counter hides an overflow from the host. @@ -206,14 +205,13 @@ int BraggPredictionGPU::Calc(const DiffractionExperiment &experiment, cudaMemsetAsync(d_count, 0, sizeof(int), stream); // Configure and launch on the stream - // Inclusive on both ends, matching the kernel's own range and the CPU loop (-max_hkl .. +max_hkl). - const int range = 2 * settings.max_hkl + 1; + // Inclusive on both ends, matching the kernel's own bounds and the CPU loops (-max_i .. +max_i). dim3 block(8, 8, 8); - dim3 grid((range + block.x - 1) / block.x, - (range + block.y - 1) / block.y, - (range + block.z - 1) / block.z); + dim3 grid((2 * settings.max_h + 1 + block.x - 1) / block.x, + (2 * settings.max_k + 1 + block.y - 1) / block.y, + (2 * settings.max_l + 1 + block.z - 1) / block.z); - bragg_kernel_3d<<>>(dK, settings.max_hkl, max_reflections, d_out, d_count); + bragg_kernel_3d<<>>(dK, settings.max_h, settings.max_k, settings.max_l, max_reflections, d_out, d_count); // Async D2H count and synchronize cudaMemcpyAsync(h_count, d_count, sizeof(int), cudaMemcpyDeviceToHost, stream); @@ -223,7 +221,7 @@ int BraggPredictionGPU::Calc(const DiffractionExperiment &experiment, if (count > max_reflections) { GrowCapacity(count); // see the rotation predictor cudaMemsetAsync(d_count, 0, sizeof(int), stream); - bragg_kernel_3d<<>>(dK, settings.max_hkl, max_reflections, d_out, d_count); + bragg_kernel_3d<<>>(dK, settings.max_h, settings.max_k, settings.max_l, max_reflections, d_out, d_count); cudaMemcpyAsync(h_count, d_count, sizeof(int), cudaMemcpyDeviceToHost, stream); cudaStreamSynchronize(stream); count = std::min(*h_count.get(), max_reflections); diff --git a/image_analysis/bragg_prediction/BraggPredictionRot.cpp b/image_analysis/bragg_prediction/BraggPredictionRot.cpp index 2ad5d6aa..d7e6b0c2 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRot.cpp +++ b/image_analysis/bragg_prediction/BraggPredictionRot.cpp @@ -50,13 +50,13 @@ int BraggPredictionRot::Calc(const DiffractionExperiment &experiment, const Crys const float mos_angle_rad = settings.mosaicity_deg * static_cast(PI) / 180.f; const float half_wedge_angle_rad = settings.wedge_deg * static_cast(PI) / 180.f / 2.0f ; - for (int h = -settings.max_hkl; h <= settings.max_hkl; h++) { + for (int h = -settings.max_h; h <= settings.max_h; h++) { // Precompute A* h contribution - for (int k = -settings.max_hkl; k <= settings.max_hkl; k++) { + for (int k = -settings.max_k; k <= settings.max_k; k++) { // Accumulate B* k contribution - for (int l = -settings.max_hkl; l <= settings.max_hkl; l++) { + for (int l = -settings.max_l; l <= settings.max_l; l++) { if (systematic_absence(h, k, l, settings.centering)) continue; diff --git a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu index 5a0ed52e..f4d2188e 100644 --- a/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu +++ b/image_analysis/bragg_prediction/BraggPredictionRotGPU.cu @@ -173,18 +173,17 @@ namespace { } __global__ void bragg_rot_kernel_3d(const KernelConstsRot *__restrict__ kc, - int max_hkl, + int max_h, int max_k, int max_l, int max_reflections, Reflection *__restrict__ out, int *__restrict__ counter) { - int range = 2 * max_hkl + 1; int hi = blockIdx.x * blockDim.x + threadIdx.x; int ki = blockIdx.y * blockDim.y + threadIdx.y; int li = blockIdx.z * blockDim.z + threadIdx.z; - if (hi >= range || ki >= range || li >= range) return; - int h = hi - max_hkl; - int k = ki - max_hkl; - int l = li - max_hkl; + if (hi > 2 * max_h || ki > 2 * max_k || li > 2 * max_l) return; + int h = hi - max_h; + int k = ki - max_k; + int l = li - max_l; Reflection r[2]; int n = compute_reflections_rot(*kc, h, k, l, r); @@ -286,14 +285,13 @@ int BraggPredictionRotGPU::Calc(const DiffractionExperiment &experiment, cudaMemcpyAsync(dK, &hK, sizeof(KernelConstsRot), cudaMemcpyHostToDevice, stream); cudaMemsetAsync(d_count, 0, sizeof(int), stream); - // Inclusive on both ends, matching the kernel's own range and the CPU loop (-max_hkl .. +max_hkl). - const int range = 2 * settings.max_hkl + 1; + // Inclusive on both ends, matching the kernel's own bounds and the CPU loops (-max_i .. +max_i). dim3 block(8, 8, 8); - dim3 grid((range + block.x - 1) / block.x, - (range + block.y - 1) / block.y, - (range + block.z - 1) / block.z); + dim3 grid((2 * settings.max_h + 1 + block.x - 1) / block.x, + (2 * settings.max_k + 1 + block.y - 1) / block.y, + (2 * settings.max_l + 1 + block.z - 1) / block.z); - bragg_rot_kernel_3d<<>>(dK, settings.max_hkl, max_reflections, d_out, d_count); + bragg_rot_kernel_3d<<>>(dK, settings.max_h, settings.max_k, settings.max_l, max_reflections, d_out, d_count); cudaMemcpyAsync(h_count, d_count, sizeof(int), cudaMemcpyDeviceToHost, stream); cudaStreamSynchronize(stream); @@ -305,7 +303,7 @@ int BraggPredictionRotGPU::Calc(const DiffractionExperiment &experiment, // so a run pays for this a handful of times at most. GrowCapacity(count); cudaMemsetAsync(d_count, 0, sizeof(int), stream); - bragg_rot_kernel_3d<<>>(dK, settings.max_hkl, max_reflections, d_out, d_count); + bragg_rot_kernel_3d<<>>(dK, settings.max_h, settings.max_k, settings.max_l, max_reflections, d_out, d_count); cudaMemcpyAsync(h_count, d_count, sizeof(int), cudaMemcpyDeviceToHost, stream); cudaStreamSynchronize(stream); count = std::min(*h_count.get(), max_reflections); diff --git a/tests/CalcBraggPredictionTest.cpp b/tests/CalcBraggPredictionTest.cpp index 8619258b..49f19e28 100644 --- a/tests/CalcBraggPredictionTest.cpp +++ b/tests/CalcBraggPredictionTest.cpp @@ -19,7 +19,7 @@ TEST_CASE("BraggPrediction_11keV") { BraggPredictionSettings settings{ .high_res_A = 2.0, .ewald_dist_cutoff = 0.001, - .max_hkl = 40 + .max_h = 40, .max_k = 40, .max_l = 40 }; BraggPrediction prediction; @@ -30,9 +30,9 @@ TEST_CASE("BraggPrediction_11keV") { auto r = prediction.GetReflections().at(i); auto recip = r.h * lattice.Astar() + r.k * lattice.Bstar() + r.l * lattice.Cstar(); - REQUIRE(std::abs(r.h) < settings.max_hkl ); - REQUIRE(std::abs(r.k) < settings.max_hkl ); - REQUIRE(std::abs(r.l) < settings.max_hkl ); + REQUIRE(std::abs(r.h) < settings.max_h ); + REQUIRE(std::abs(r.k) < settings.max_k ); + REQUIRE(std::abs(r.l) < settings.max_l ); REQUIRE(r.d >= settings.high_res_A); REQUIRE(r.d == Catch::Approx(1/std::sqrt(recip * recip)).margin(0.01f)); REQUIRE(r.dist_ewald == Catch::Approx(std::abs(geom.DistFromEwaldSphere(recip))).epsilon(1e-4)); @@ -55,7 +55,7 @@ TEST_CASE("BraggPrediction_15keV") { BraggPredictionSettings settings{ .high_res_A = 2.0, .ewald_dist_cutoff = 0.001, - .max_hkl = 40 + .max_h = 40, .max_k = 40, .max_l = 40 }; BraggPrediction prediction; @@ -66,9 +66,9 @@ TEST_CASE("BraggPrediction_15keV") { auto r = prediction.GetReflections().at(i); auto recip = r.h * lattice.Astar() + r.k * lattice.Bstar() + r.l * lattice.Cstar(); - REQUIRE(std::abs(r.h) < settings.max_hkl ); - REQUIRE(std::abs(r.k) < settings.max_hkl ); - REQUIRE(std::abs(r.l) < settings.max_hkl ); + REQUIRE(std::abs(r.h) < settings.max_h ); + REQUIRE(std::abs(r.k) < settings.max_k ); + REQUIRE(std::abs(r.l) < settings.max_l ); REQUIRE(r.d >= settings.high_res_A); REQUIRE(r.d == Catch::Approx(1/std::sqrt(recip * recip)).margin(0.01f)); REQUIRE(r.dist_ewald == Catch::Approx(std::abs(geom.DistFromEwaldSphere(recip))).epsilon(1e-3)); @@ -92,7 +92,7 @@ TEST_CASE("BraggPrediction_Rot1_Rot2") { BraggPredictionSettings settings{ .high_res_A = 2.0, .ewald_dist_cutoff = 0.001, - .max_hkl = 40 + .max_h = 40, .max_k = 40, .max_l = 40 }; BraggPrediction prediction; @@ -103,9 +103,9 @@ TEST_CASE("BraggPrediction_Rot1_Rot2") { auto r = prediction.GetReflections().at(i); auto recip = r.h * lattice.Astar() + r.k * lattice.Bstar() + r.l * lattice.Cstar(); - REQUIRE(std::abs(r.h) < settings.max_hkl ); - REQUIRE(std::abs(r.k) < settings.max_hkl ); - REQUIRE(std::abs(r.l) < settings.max_hkl ); + REQUIRE(std::abs(r.h) < settings.max_h ); + REQUIRE(std::abs(r.k) < settings.max_k ); + REQUIRE(std::abs(r.l) < settings.max_l ); REQUIRE(r.d >= settings.high_res_A); REQUIRE(r.d == Catch::Approx(1/std::sqrt(recip * recip)).margin(0.01f)); REQUIRE(r.dist_ewald == Catch::Approx(std::abs(geom.DistFromEwaldSphere(recip))).epsilon(1e-4)); @@ -130,7 +130,7 @@ TEST_CASE("BraggPrediction_backscattering") { BraggPredictionSettings settings{ .high_res_A = 3.0f, .ewald_dist_cutoff = 0.1f, // Very large cutoff, to be able to see as many reflections as possible - .max_hkl = 50 + .max_h = 50, .max_k = 50, .max_l = 50 }; BraggPrediction pred; @@ -157,7 +157,7 @@ TEST_CASE("BraggPrediction_systematic_absences") { BraggPredictionSettings settings{ .high_res_A = 3.0f, .ewald_dist_cutoff = 0.1f, // Very large cutoff, to be able to see as many reflections as possible - .max_hkl = 50 + .max_h = 50, .max_k = 50, .max_l = 50 }; BraggPrediction pred; @@ -219,7 +219,7 @@ TEST_CASE("BraggPredictionGPU") { BraggPredictionSettings settings{ .high_res_A = 2.0, .ewald_dist_cutoff = 0.001, - .max_hkl = 40 + .max_h = 40, .max_k = 40, .max_l = 40 }; BraggPredictionGPU prediction; @@ -230,9 +230,9 @@ TEST_CASE("BraggPredictionGPU") { auto r = prediction.GetReflections().at(i); auto recip = r.h * lattice.Astar() + r.k * lattice.Bstar() + r.l * lattice.Cstar(); - REQUIRE(std::abs(r.h) < settings.max_hkl ); - REQUIRE(std::abs(r.k) < settings.max_hkl ); - REQUIRE(std::abs(r.l) < settings.max_hkl ); + REQUIRE(std::abs(r.h) < settings.max_h ); + REQUIRE(std::abs(r.k) < settings.max_k ); + REQUIRE(std::abs(r.l) < settings.max_l ); REQUIRE(r.d >= settings.high_res_A); REQUIRE(r.d == Catch::Approx(1/std::sqrt(recip * recip)).margin(0.01f)); REQUIRE(r.dist_ewald == Catch::Approx(std::abs(geom.DistFromEwaldSphere(recip))).epsilon(2e-2)); @@ -256,7 +256,7 @@ TEST_CASE("BraggPredictionGPU_Rot1_Rot2") { BraggPredictionSettings settings{ .high_res_A = 2.0, .ewald_dist_cutoff = 0.001, - .max_hkl = 40 + .max_h = 40, .max_k = 40, .max_l = 40 }; BraggPredictionGPU prediction; @@ -267,9 +267,9 @@ TEST_CASE("BraggPredictionGPU_Rot1_Rot2") { auto r = prediction.GetReflections().at(i); auto recip = r.h * lattice.Astar() + r.k * lattice.Bstar() + r.l * lattice.Cstar(); - REQUIRE(std::abs(r.h) < settings.max_hkl ); - REQUIRE(std::abs(r.k) < settings.max_hkl ); - REQUIRE(std::abs(r.l) < settings.max_hkl ); + REQUIRE(std::abs(r.h) < settings.max_h ); + REQUIRE(std::abs(r.k) < settings.max_k ); + REQUIRE(std::abs(r.l) < settings.max_l ); REQUIRE(r.d >= settings.high_res_A); REQUIRE(r.d == Catch::Approx(1/std::sqrt(recip * recip)).margin(0.01f)); REQUIRE(r.dist_ewald == Catch::Approx(std::abs(geom.DistFromEwaldSphere(recip))).epsilon(1e-3)); @@ -293,7 +293,7 @@ TEST_CASE("BraggPredictionGPU_systematic_absences") { BraggPredictionSettings settings{ .high_res_A = 3.0f, .ewald_dist_cutoff = 0.1f, - .max_hkl = 50 + .max_h = 50, .max_k = 50, .max_l = 50 }; BraggPredictionGPU pred; @@ -353,7 +353,7 @@ TEST_CASE("BraggPredictionGPU_backscattering") { BraggPredictionSettings settings{ .high_res_A = 3.0f, .ewald_dist_cutoff = 0.1f, // Very large cutoff, to be able to see as many reflections as possible - .max_hkl = 50 + .max_h = 50, .max_k = 50, .max_l = 50 }; BraggPredictionGPU pred; @@ -377,7 +377,7 @@ TEST_CASE("BraggPrediction_CPU_GPU_consistency_tilted") { BraggPredictionSettings settings{ .high_res_A = 2.0, .ewald_dist_cutoff = 0.0015, - .max_hkl = 30 + .max_h = 30, .max_k = 30, .max_l = 30 }; BraggPrediction cpu_pred; diff --git a/tests/IndexingUnitTest.cpp b/tests/IndexingUnitTest.cpp index 429136f7..545c68c1 100644 --- a/tests/IndexingUnitTest.cpp +++ b/tests/IndexingUnitTest.cpp @@ -264,7 +264,7 @@ TEST_CASE("PostIndexingRefinement_MultiLattice_TwoCrystals_BraggPrediction","[In BraggPredictionSettings pred_settings{ .high_res_A = 2.0f, .ewald_dist_cutoff = 0.0010f, - .max_hkl = 20, + .max_h = 20, .max_k = 20, .max_l = 20, .centering = 'P', .wedge_deg = 0.1f, .mosaicity_deg = 0.2f, @@ -364,7 +364,7 @@ TEST_CASE("FFTIndexer_MultiLattice_TwoCrystals_BraggPrediction","[Indexing]") { BraggPredictionSettings pred_settings{ .high_res_A = 2.0f, .ewald_dist_cutoff = 0.0010f, - .max_hkl = 20, + .max_h = 20, .max_k = 20, .max_l = 20, .centering = 'P', .wedge_deg = 0.1f, .mosaicity_deg = 0.2f, @@ -447,7 +447,7 @@ TEST_CASE("FFBIDXIndexer_MultiLattice_TwoCrystals_BraggPrediction","[Indexing]") BraggPredictionSettings pred_settings{ .high_res_A = 2.0f, .ewald_dist_cutoff = 0.0010f, - .max_hkl = 20, + .max_h = 20, .max_k = 20, .max_l = 20, .centering = 'P', .wedge_deg = 0.1f, .mosaicity_deg = 0.2f,