Scaling/Merging: Work in progress to improve the information that is fed to scaling. This is a mess at the moment - with redundant data structures, etc. - will clean this up, later.
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 11m30s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m21s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m55s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 14m10s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 14m33s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 11m46s
Build Packages / build:rpm (rocky8) (push) Successful in 11m48s
Build Packages / build:rpm (rocky9) (push) Successful in 12m23s
Build Packages / XDS test (durin plugin) (push) Successful in 8m39s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m18s
Build Packages / Generate python client (push) Successful in 49s
Build Packages / Create release (push) Skipped
Build Packages / build:rpm (ubuntu2204) (push) Successful in 13m6s
Build Packages / Build documentation (push) Successful in 1m3s
Build Packages / DIALS test (push) Successful in 13m57s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 6m44s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m1s
Build Packages / Unit tests (push) Successful in 57m53s

This commit is contained in:
2026-05-25 10:09:49 +02:00
parent fe19ff8ec6
commit a85eb4b137
11 changed files with 332 additions and 22 deletions
+24 -12
View File
@@ -18,7 +18,8 @@ IndexAndRefine::IndexAndRefine(const DiffractionExperiment &x, IndexerThreadPool
indexer_(indexer) {
if (indexer && x.IsRotationIndexing())
rotation_indexer = std::make_unique<RotationIndexer>(x, *indexer);
reflections.resize(x.GetImageNum());
integration_outcome.resize(x.GetImageNum());
mosaicity.resize(x.GetImageNum(), NAN);
scale_cc.resize(x.GetImageNum(), 0);
unit_cells.resize(x.GetImageNum());
@@ -233,7 +234,14 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
{
std::unique_lock ul(reflections_mutex);
reflections[msg.number] = msg.reflections; // Image is not processed twice, so thread-safe in principle, but better safe than sorry :)
integration_outcome[msg.number] = IntegrationOutcome{
.geom = outcome.experiment.GetDiffractionGeometry(),
.latt = latt,
.reflections = msg.reflections,
.mosaicity_deg = msg.image_scale_mosaicity,
.image_scale_b_factor_Ang2 = msg.image_scale_b_factor,
.image_scale_cc = msg.image_scale_cc,
};
}
}
@@ -302,17 +310,13 @@ void IndexAndRefine::ScaleImage(DataMessage &msg) {
ScalingResult IndexAndRefine::ScaleAllImages(const std::vector<MergedReflection> &reference, size_t nthreads) {
ScaleOnTheFly scaling(experiment, reference);
auto result = scaling.Scale(reflections, mosaicity, nthreads);
scale_cc = result.image_cc;
return result;
}
scaling.Scale(integration_outcome, nthreads);
scale_cc.resize(integration_outcome.size());
const std::vector<std::vector<Reflection> > &IndexAndRefine::GetReflections() const {
return reflections;
}
for (int i = 0; i < integration_outcome.size(); i++)
scale_cc.at(i) = integration_outcome[i].image_scale_cc.value_or(NAN);
std::vector<std::vector<Reflection> > &IndexAndRefine::GetReflections() {
return reflections;
return ScalingResult(integration_outcome);
}
const std::vector<float> &IndexAndRefine::GetImageCC() const {
@@ -387,4 +391,12 @@ std::optional<UnitCell> IndexAndRefine::GetConsensusUnitCell() const {
}
return MeanUnitCell(accepted);
}
}
std::vector<IntegrationOutcome> &IndexAndRefine::GetIntegrationOutcome() {
return integration_outcome;
}
const std::vector<IntegrationOutcome> &IndexAndRefine::GetIntegrationOutcome() const {
return integration_outcome;
}