BraggPredictionRotation: New implementation - looks OK, but accuracy is terrible (+/- 10 images wrong)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user