diff --git a/tests/XtalOptimizerTest.cpp b/tests/XtalOptimizerTest.cpp index 5a809a87..f200693a 100644 --- a/tests/XtalOptimizerTest.cpp +++ b/tests/XtalOptimizerTest.cpp @@ -538,10 +538,14 @@ TEST_CASE("XtalOptimizer_rotation") { } } - // Seed slightly perturbed geometry and lattice; provide rotation axis for refinement + // Seed slightly perturbed geometry and lattice; provide rotation axis for refinement. + // The beam-centre component PARALLEL to the spindle (here X, the rotation axis) is a gauge-weak + // direction that XtalOptimizer now deliberately restrains toward the header rather than refining + // freely (see the BeamComponentPrior in XtalOptimizer.cpp). So only the perpendicular component + // (Y) is seeded off-truth to exercise beam-centre recovery; X is seeded at its true value. XtalOptimizerData xtal_opt{}; xtal_opt.latt = CrystalLattice(39.7f, 50.6f, 79.6f, 90.0f, 94.5f, 90.5f); - xtal_opt.geom.BeamX_pxl(1003).BeamY_pxl(997).DetectorDistance_mm(203.0) + xtal_opt.geom.BeamX_pxl(1000).BeamY_pxl(997).DetectorDistance_mm(203.0) .PoniRot1_rad(0.01).PoniRot2_rad(0.02); xtal_opt.crystal_system = gemmi::CrystalSystem::Monoclinic; xtal_opt.axis = axis;