diff --git a/image_analysis/indexing/AnalyzeIndexing.cpp b/image_analysis/indexing/AnalyzeIndexing.cpp index 3fa42078..51e884ff 100644 --- a/image_analysis/indexing/AnalyzeIndexing.cpp +++ b/image_analysis/indexing/AnalyzeIndexing.cpp @@ -125,8 +125,6 @@ namespace { const Coord w = axis->GetAxis().Normalize(); const Coord S0 = experiment.GetScatteringVector(); const float wedge_deg = axis->GetWedge_deg(); - const float start_deg = axis->GetStart_deg(); - const float inc_deg = axis->GetIncrement_deg(); double sum_sq = 0.0; int count = 0; @@ -135,21 +133,14 @@ namespace { if (!s.indexed) continue; - // Observed angle: use frame center - const float image_center = static_cast(s.image) + 0.5f; - const float phi_obs_deg = start_deg + inc_deg * image_center; - - // g0 at phi=0 assumption - const Coord g0 = astar * static_cast(s.h) - + bstar * static_cast(s.k) - + cstar * static_cast(s.l); + 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(g0, S0, w, phi_obs_deg, wedge_deg); + 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_obs_deg - phi_pred_deg_opt.value()); + float dphi = wrap_deg_pm180(phi_pred_deg_opt.value()); sum_sq += static_cast(dphi) * static_cast(dphi); count++; }