diff --git a/image_analysis/indexing/AnalyzeIndexing.cpp b/image_analysis/indexing/AnalyzeIndexing.cpp index 13397226..fab95eb6 100644 --- a/image_analysis/indexing/AnalyzeIndexing.cpp +++ b/image_analysis/indexing/AnalyzeIndexing.cpp @@ -272,42 +272,6 @@ namespace { return rad_to_deg(sigma_M_rad); } - - std::optional CalcMosaicity(const DiffractionExperiment& experiment, - const std::vector &spots, - const Coord &astar, const Coord &bstar, const Coord &cstar) { - const auto &axis = experiment.GetGoniometer(); - if (axis.has_value()) { - const Coord w = axis->GetAxis().Normalize(); - const Coord S0 = experiment.GetScatteringVector(); - const float wedge_deg = axis->GetWedge_deg(); - - double sum_sq = 0.0; - int count = 0; - - for (const auto &s: spots) { - if (!s.indexed) - continue; - - const Coord pstar = astar * static_cast(s.h) + bstar * static_cast(s.k) + cstar * static_cast(s.l); - - // Local solve window: +/- 1 wedge (easy/robust first try) - const auto phi_pred_deg_opt = predict_phi_deg_local(pstar, S0, w, 0.0, wedge_deg); - if (!phi_pred_deg_opt.has_value()) - continue; - - float dphi = wrap_deg_pm180(phi_pred_deg_opt.value()); - sum_sq += static_cast(dphi) * static_cast(dphi); - count++; - } - - if (count > 0) { - return static_cast(std::sqrt(sum_sq / static_cast(count))); - } - } - return std::nullopt; - } - } // namespace bool AnalyzeIndexing(DataMessage &message,