BraggPredictionRotation: New implementation - looks OK, but accuracy is terrible (+/- 10 images wrong)

This commit is contained in:
2026-01-22 14:13:52 +01:00
parent d3f311dc97
commit 45ca48cc01
4 changed files with 87 additions and 155 deletions
+12 -1
View File
@@ -6,6 +6,7 @@
#include "geom_refinement/XtalOptimizer.h"
#include "indexing/FFTIndexer.h"
#include "lattice_search/LatticeSearch.h"
#include <iostream>
RotationIndexer::RotationIndexer(const DiffractionExperiment &x, IndexerThreadPool &indexer)
: experiment(x),
@@ -15,7 +16,7 @@ RotationIndexer::RotationIndexer(const DiffractionExperiment &x, IndexerThreadPo
updated_geom_(geom_),
indexer_(indexer) {
if (axis_) {
float angle_norm_deg = std::fabs(axis_->GetIncrement_deg());
angle_norm_deg = std::fabs(axis_->GetIncrement_deg());
if (angle_norm_deg < 1e-6) {
// Guard against rotation close to zero
axis_ = std::nullopt;
@@ -97,6 +98,12 @@ void RotationIndexer::TryIndex() {
indexed_lattice = data.latt;
updated_geom_ = data.geom;
}
PredictionRotationSettings pred_settings{
.high_res_A = 1.0,
.max_hkl = 100,
.centering = search_result_.centering
};
predictions = PredictRotationHKLs(experiment, data.latt, pred_settings);
}
}
@@ -144,3 +151,7 @@ std::optional<RotationIndexerResult> RotationIndexer::GetLattice() {
.geom = updated_geom_
};
}
const std::vector<PredictionRotationResult> &RotationIndexer::GetPredictions() const {
return predictions;
}