IndexAndRefine: Use mosaicity from indexing for scaling

This commit is contained in:
2026-02-20 13:18:16 +01:00
parent 203eefca66
commit c33366f3d6
3 changed files with 18 additions and 16 deletions

View File

@@ -18,6 +18,7 @@ IndexAndRefine::IndexAndRefine(const DiffractionExperiment &x, IndexerThreadPool
if (indexer && x.IsRotationIndexing())
rotation_indexer = std::make_unique<RotationIndexer>(x, *indexer);
reflections.resize(x.GetImageNum());
mosaicity.resize(x.GetImageNum(), NAN);
}
IndexAndRefine::IndexingOutcome IndexAndRefine::DetermineLatticeAndSymmetry(DataMessage &msg) {
@@ -167,8 +168,10 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
if (experiment.GetGoniometer().has_value()) {
wedge_deg = experiment.GetGoniometer()->GetWedge_deg() / 2.0;
if (msg.mosaicity_deg)
if (msg.mosaicity_deg) {
mos_deg = msg.mosaicity_deg.value();
mosaicity[msg.number] = mos_deg;
}
}
const BraggPredictionSettings settings_prediction{
@@ -255,8 +258,10 @@ std::optional<ScaleMergeResult> IndexAndRefine::ScaleRotationData(const ScaleMer
ScaleMergeOptions options = opts;
// If the experiment provides a wedge, propagate it
if (experiment.GetGoniometer().has_value())
if (experiment.GetGoniometer().has_value()) {
options.wedge_deg = experiment.GetGoniometer()->GetWedge_deg();
options.mosaicity_init_deg_vec = mosaicity;
}
// If caller left space_group unset, try to pick it from the indexed lattice
if (!options.space_group.has_value()) {