JFJochReceiver: Don't retry to get rotation indexing solution if it is already found
Build Packages / build:rpm (ubuntu2404) (push) Has been cancelled
Build Packages / Generate python client (push) Has been cancelled
Build Packages / Build documentation (push) Has been cancelled
Build Packages / Unit tests (push) Has been cancelled
Build Packages / Create release (push) Has been cancelled
Build Packages / build:rpm (ubuntu2204) (push) Has been cancelled
Build Packages / build:rpm (rocky9) (push) Has been cancelled
Build Packages / build:rpm (rocky8) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Has been cancelled
Build Packages / build:rpm (rocky8_sls9) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Has been cancelled
Build Packages / build:rpm (rocky9_nocuda) (push) Has been cancelled
Build Packages / build:rpm (rocky8_nocuda) (push) Has been cancelled

This commit is contained in:
2025-12-01 20:07:07 +01:00
parent baefad5fca
commit 448552ee32
6 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -156,8 +156,8 @@ void IndexAndRefine::ProcessImage(DataMessage &msg,
}
}
std::optional<RotationIndexerResult> IndexAndRefine::Finalize(bool retry) {
std::optional<RotationIndexerResult> IndexAndRefine::Finalize() {
if (rotation_indexer)
return rotation_indexer->Finalize(retry);
return rotation_indexer->Finalize();
return {};
}
+1 -1
View File
@@ -29,7 +29,7 @@ public:
IndexAndRefine(const DiffractionExperiment &x, IndexerThreadPool *indexer);
void SetLattice(const CrystalLattice &lattice);
void ProcessImage(DataMessage &msg, const SpotFindingSettings &settings, const CompressedImage &image, BraggPrediction &prediction);
std::optional<RotationIndexerResult> Finalize(bool retry);
std::optional<RotationIndexerResult> Finalize();
};
+3 -3
View File
@@ -111,7 +111,7 @@ std::optional<RotationIndexerResult> RotationIndexer::ProcessImage(int64_t image
const auto rot = axis_->GetTransformation(image);
if (image >= last_accumulated_image + image_stride) {
if (!indexed_lattice && image >= last_accumulated_image + image_stride) {
v_.reserve(v_.size() + spots.size());
coords_.reserve(coords_.size() + spots.size());
@@ -143,8 +143,8 @@ std::optional<RotationIndexerResult> RotationIndexer::ProcessImage(int64_t image
return {};
}
std::optional<RotationIndexerResult> RotationIndexer::Finalize(bool retry) {
if (!indexed_lattice || retry)
std::optional<RotationIndexerResult> RotationIndexer::Finalize() {
if (!indexed_lattice)
TryIndex();
if (!indexed_lattice)
return std::nullopt;
+1 -1
View File
@@ -56,7 +56,7 @@ public:
RotationIndexer(const DiffractionExperiment& x, IndexerThreadPool& indexer);
void SetLattice(const CrystalLattice &lattice);
std::optional<RotationIndexerResult> ProcessImage(int64_t image, const std::vector<SpotToSave>& spots);
std::optional<RotationIndexerResult> Finalize(bool retry);
std::optional<RotationIndexerResult> Finalize();
};
#endif //JFJOCH_ROTATIONINDEXER_H
+1 -1
View File
@@ -154,7 +154,7 @@ void JFJochReceiver::SendEndMessage() {
message.az_int_result["dataset"] = plots.GetAzIntProfile();
const auto rotation_indexer_ret = indexer.Finalize(true);
const auto rotation_indexer_ret = indexer.Finalize();
if (rotation_indexer_ret.has_value()) {
message.rotation_lattice = rotation_indexer_ret->lattice;
message.rotation_lattice_type = LatticeMessage{
+1 -1
View File
@@ -74,7 +74,7 @@ TEST_CASE("RotationIndexer") {
CHECK(cnt == 20);
auto ret = indexer.Finalize(false);
auto ret = indexer.Finalize();
REQUIRE(ret.has_value());
auto uc = ret->lattice.GetUnitCell();
auto uc_ref = latt_base.GetUnitCell();