jfjoch_process: Include scaling - to be tested
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m27s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m22s
Build Packages / Generate python client (push) Successful in 22s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m44s
Build Packages / build:rpm (rocky8) (push) Successful in 13m59s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (ubuntu2204) (push) Successful in 14m0s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 14m13s
Build Packages / Build documentation (push) Successful in 38s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 14m31s
Build Packages / build:rpm (rocky9) (push) Successful in 14m45s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 7m10s
Build Packages / Unit tests (push) Successful in 52m56s

This commit is contained in:
2026-02-08 18:45:39 +01:00
parent 7f1f28f8d3
commit 6e28ad3523
4 changed files with 111 additions and 9 deletions
+29
View File
@@ -240,3 +240,32 @@ std::optional<RotationIndexerResult> IndexAndRefine::Finalize() {
return rotation_indexer->GetLattice();
return {};
}
std::optional<ScaleMergeResult> IndexAndRefine::ScaleRotationData(const ScaleMergeOptions &opts) const {
std::vector<Reflection> snapshot;
{
std::unique_lock ul(reflections_mutex);
snapshot = reflections; // cheap copy under lock
}
// Need a reasonable number of reflections to make refinement meaningful
constexpr size_t kMinReflections = 20;
if (snapshot.size() < kMinReflections)
return std::nullopt;
// Build options focused on mosaicity refinement but allow caller override
ScaleMergeOptions options = opts;
// If the experiment provides a wedge, propagate it
if (experiment.GetGoniometer().has_value())
options.wedge_deg = experiment.GetGoniometer()->GetWedge_deg();
// If caller left space_group unset, try to pick it from the indexed lattice
if (!options.space_group.has_value()) {
auto sg = experiment.GetGemmiSpaceGroup();
if (sg)
options.space_group = *sg;
}
return ScaleAndMergeReflectionsCeres(snapshot, options);
}