IndexAndRefine: Fixes
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m15s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m17s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m14s
Build Packages / build:rpm (rocky8) (push) Successful in 13m13s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 13m13s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m24s
Build Packages / Generate python client (push) Successful in 19s
Build Packages / Build documentation (push) Successful in 39s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 14m2s
Build Packages / build:rpm (rocky9) (push) Successful in 14m0s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 6m45s
Build Packages / Unit tests (push) Successful in 53m38s

This commit is contained in:
2025-11-30 08:28:02 +01:00
parent 2c35655f5e
commit a08cc17f9f
5 changed files with 16 additions and 14 deletions
+10 -10
View File
@@ -18,11 +18,10 @@ IndexAndRefine::IndexAndRefine(const DiffractionExperiment &x, IndexerThreadPool
geom_(x.GetDiffractionGeometry()),
updated_geom_(geom_),
indexer_(indexer) {
auto axis = x.GetGoniometer();
if (indexer && axis && x.GetIndexingSettings().GetRotationIndexing()) {
float angle_norm_deg = std::fabs(axis_->GetIncrement_deg());
float angle_norm_deg = std::fabs(axis->GetIncrement_deg());
if (angle_norm_deg > 1e-6) {
axis_ = axis;
if (x.GetImageNum() > min_images_for_indexing) {
@@ -108,9 +107,9 @@ void IndexAndRefine::TryIndexRotationData() {
}
void IndexAndRefine::ProcessImage(DataMessage &msg,
const SpotFindingSettings &spot_finding_settings,
const CompressedImage &image,
BraggPrediction &prediction) {
const SpotFindingSettings &spot_finding_settings,
const CompressedImage &image,
BraggPrediction &prediction) {
if (!indexer_)
return;
@@ -267,11 +266,12 @@ std::optional<RotationIndexerResult> IndexAndRefine::Finalize(bool retry) {
if (!indexed_lattice || retry)
TryIndexRotationData();
return RotationIndexerResult{
.lattice = indexed_lattice.value(),
.search_result = search_result_,
.geom = geom_
};
if (indexed_lattice)
return RotationIndexerResult{
.lattice = indexed_lattice.value(),
.search_result = search_result_,
.geom = geom_
};
}
return {};
}