Multi lattice search: Small changes (WIP)
Build Packages / Unit tests (push) Failing after 3m9s
Build Packages / build:rpm (rocky8) (push) Failing after 4m37s
Build Packages / build:rpm (rocky9_nocuda) (push) Failing after 5m3s
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 4m57s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Failing after 5m22s
Build Packages / build:rpm (rocky9_sls9) (push) Failing after 5m57s
Build Packages / build:rpm (rocky8_nocuda) (push) Failing after 6m17s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Failing after 6m56s
Build Packages / Generate python client (push) Successful in 30s
Build Packages / build:rpm (rocky9) (push) Failing after 4m39s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Successful in 36s
Build Packages / DIALS test (push) Failing after 3m34s
Build Packages / build:rpm (ubuntu2404) (push) Failing after 4m4s
Build Packages / XDS test (JFJoch plugin) (push) Failing after 3m7s
Build Packages / XDS test (durin plugin) (push) Failing after 3m47s
Build Packages / build:rpm (ubuntu2204) (push) Failing after 4m34s
Build Packages / XDS test (neggia plugin) (push) Failing after 3m49s

This commit is contained in:
2026-06-05 16:29:54 +02:00
parent 4c45d1c835
commit f9eee954de
7 changed files with 18 additions and 19 deletions
+2 -3
View File
@@ -112,9 +112,8 @@ struct DataMessage {
std::optional<float> bkg_estimate;
std::optional<bool> indexing_result;
std::optional<int64_t> indexing_lattice_count;
std::optional<CrystalLattice> indexing_lattice;
std::vector<CrystalLattice> extra_lattices;
std::vector<CrystalLattice> indexing_extra_lattices;
std::optional<UnitCell> indexing_unit_cell;
std::optional<int64_t> spot_count_indexed;
@@ -330,7 +329,7 @@ struct EndMessage {
std::optional<LatticeMessage> rotation_lattice_type;
std::optional<CrystalLattice> rotation_lattice;
std::vector<CrystalLattice> extra_lattices;
std::vector<CrystalLattice> rotation_extra_lattices;
std::optional<UnitCell> unit_cell;
// Vectors with end result:
+2 -2
View File
@@ -733,7 +733,7 @@ namespace {
std::vector<float> tmp;
GetCBORFloatArray(array_value, tmp);
if (tmp.size() == 9)
message.extra_lattices.emplace_back(tmp);
message.indexing_extra_lattices.emplace_back(tmp);
}
cborErr(cbor_value_leave_container(&value, &array_value));
} else if (key == "indexing_time")
@@ -1429,7 +1429,7 @@ namespace {
std::vector<float> tmp;
GetCBORFloatArray(array_value, tmp);
if (tmp.size() == 9)
message.extra_lattices.emplace_back(tmp);
message.rotation_extra_lattices.emplace_back(tmp);
}
cborErr(cbor_value_leave_container(&value, &array_value));
} else
+6 -6
View File
@@ -722,11 +722,11 @@ void CBORStream2Serializer::SerializeSequenceEnd(const EndMessage& message) {
CBOR_ENC(mapEncoder, "rotation_lattice_type", message.rotation_lattice_type);
if (message.rotation_lattice.has_value())
CBOR_ENC(mapEncoder, "rotation_lattice", message.rotation_lattice->GetVector());
if (!message.extra_lattices.empty()) {
if (!message.rotation_extra_lattices.empty()) {
CborEncoder arrayEncoder;
cborErr(cbor_encode_text_stringz(&mapEncoder, "extra_lattices"));
cborErr(cbor_encoder_create_array(&mapEncoder, &arrayEncoder, message.extra_lattices.size()));
for (const auto &el : message.extra_lattices)
cborErr(cbor_encoder_create_array(&mapEncoder, &arrayEncoder, message.rotation_extra_lattices.size()));
for (const auto &el : message.rotation_extra_lattices)
CBOR_ENC_FLOAT_ARRAY_NOKEY(arrayEncoder, el.GetVector());
cborErr(cbor_encoder_close_container(&mapEncoder, &arrayEncoder));
}
@@ -781,11 +781,11 @@ void CBORStream2Serializer::SerializeImageInternal(CborEncoder &mapEncoder, cons
CBOR_ENC(mapEncoder, "indexing_lattice_count", message.indexing_lattice_count);
if (message.indexing_lattice)
CBOR_ENC(mapEncoder, "indexing_lattice", message.indexing_lattice->GetVector());
if (!message.extra_lattices.empty()) {
if (!message.indexing_extra_lattices.empty()) {
CborEncoder arrayEncoder;
cborErr(cbor_encode_text_stringz(&mapEncoder, "extra_lattices"));
cborErr(cbor_encoder_create_array(&mapEncoder, &arrayEncoder, message.extra_lattices.size()));
for (const auto &el : message.extra_lattices)
cborErr(cbor_encoder_create_array(&mapEncoder, &arrayEncoder, message.indexing_extra_lattices.size()));
for (const auto &el : message.indexing_extra_lattices)
CBOR_ENC_FLOAT_ARRAY_NOKEY(arrayEncoder, el.GetVector());
cborErr(cbor_encoder_close_container(&mapEncoder, &arrayEncoder));
}
+4 -4
View File
@@ -369,8 +369,8 @@ bool AnalyzeIndexing(DataMessage &message,
// Spots already assigned to the main lattice (lattice == 0) are never
// overwritten. Each extra lattice gets index 1, 2, 3, ...
const size_t n_extra = std::min<size_t>(extra_lattices.size(), experiment.GetIndexingSettings().GetMaxExtraLattices());
message.extra_lattices.clear();
message.extra_lattices.reserve(n_extra);
message.indexing_extra_lattices.clear();
message.indexing_extra_lattices.reserve(n_extra);
for (size_t li = 0; li < n_extra; li++) {
const CrystalLattice &el = extra_lattices[li];
@@ -414,10 +414,10 @@ bool AnalyzeIndexing(DataMessage &message,
}
}
message.extra_lattices.push_back(el);
message.indexing_extra_lattices.push_back(el);
}
message.indexing_lattice_count = static_cast<int64_t>(1 + message.extra_lattices.size());
message.indexing_lattice_count = static_cast<int64_t>(1 + message.indexing_extra_lattices.size());
outcome = true;
}
}
+1 -1
View File
@@ -172,7 +172,7 @@ void JFJochReceiver::SendEndMessage() {
.niggli_class = rotation_indexer_ret->search_result.niggli_class,
.crystal_system = rotation_indexer_ret->search_result.system
};
message.extra_lattices = rotation_indexer_ret->extra_lattices;
message.rotation_extra_lattices = rotation_indexer_ret->extra_lattices;
rotation_indexing_lattice = rotation_indexer_ret->lattice;
}
message.unit_cell = indexer.GetConsensusUnitCell();
+1 -1
View File
@@ -168,7 +168,7 @@ void JFJochReceiverPlots::Add(const DataMessage &msg, const AzimuthalIntegration
indexing_uc_gamma.AddElement(msg.number, msg.indexing_unit_cell->gamma);
}
indexing_lattice_count.AddElement(msg.number, msg.indexing_lattice_count);
indexing_lattice_count.AddElement(msg.number, msg.indexing_extra_lattices.size());
beam_center_x.AddElement(msg.number, msg.beam_corr_x);
beam_center_y.AddElement(msg.number, msg.beam_corr_y);
+2 -2
View File
@@ -177,8 +177,8 @@ void HDF5DataFilePluginMX::Write(const DataMessage &msg, uint64_t image_number)
for (size_t li = 0; li < max_extra_lattices; li++) {
const size_t base = (image_number * max_extra_lattices + li) * 9;
if (li < msg.extra_lattices.size()) {
auto tmp = msg.extra_lattices[li].GetVector();
if (li < msg.indexing_extra_lattices.size()) {
auto tmp = msg.indexing_extra_lattices[li].GetVector();
for (int i = 0; i < 9; i++)
extra_lattices[base + i] = tmp[i];
} else {