diff --git a/image_analysis/scale_merge/SearchSpaceGroup.cpp b/image_analysis/scale_merge/SearchSpaceGroup.cpp index b0e64d2e..c381f5f1 100644 --- a/image_analysis/scale_merge/SearchSpaceGroup.cpp +++ b/image_analysis/scale_merge/SearchSpaceGroup.cpp @@ -563,9 +563,12 @@ SearchSpaceGroupResult SearchSpaceGroup( // The parent b is floored (min_systematic_b_for_veto) so a near-zero parent on excellent data cannot // fabricate a huge ratio out of a still-tiny absolute b (a genuine 422 at b=0.05 over a 222 parent at // b=0.008 is not a twin - a real twin drives b to ~0.19 regardless). + bool b_refused = false; if (consistent && parent_b > 1e-4 - && c.b_extra > std::max(parent_b, opt.min_systematic_b_for_veto) * opt.max_systematic_b_veto) + && c.b_extra > std::max(parent_b, opt.min_systematic_b_for_veto) * opt.max_systematic_b_veto) { consistent = false; + b_refused = true; + } // The H test is a necessary condition for promotion where it can be computed: it is the only // statistic measured to separate genuine symmetry from a merohedral twin across data amounts. @@ -582,6 +585,11 @@ SearchSpaceGroupResult SearchSpaceGroup( refused_why = "operator disagreement H is " + FormatDouble(h_ratio, 2) + "x the parent's (bound " + FormatDouble(opt.max_operator_h_ratio, 2) + ") - the added operator relates unequal intensities, as a twin law does"; + else if (b_refused) + refused_why = "its merge's systematic error b is " + FormatDouble(c.b_extra, 3) + + " against the subgroup's " + FormatDouble(parent_b, 3) + + " (bound " + FormatDouble(opt.max_systematic_b_veto, 2) + + "x) - the added operator forces unequal intensities together"; else if (std::isfinite(c.chi2) && std::isfinite(chi2_ref)) refused_why = "merge chi^2 is " + FormatDouble(c.chi2 / chi2_ref, 2) + "x the subgroup's (bound " + FormatDouble(opt.max_merge_chi2_ratio, 2) + ")";