v1.0.0-rc.127 (#34)
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m51s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m0s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 9m6s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m7s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 9m47s
Build Packages / Generate python client (push) Successful in 29s
Build Packages / Build documentation (push) Successful in 43s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 10m46s
Build Packages / build:rpm (rocky8) (push) Successful in 9m33s
Build Packages / Unit tests (push) Has been skipped
Build Packages / build:rpm (ubuntu2204) (push) Successful in 8m47s
Build Packages / build:rpm (rocky9) (push) Successful in 9m55s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m4s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m51s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m0s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 9m6s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m7s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 9m47s
Build Packages / Generate python client (push) Successful in 29s
Build Packages / Build documentation (push) Successful in 43s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 10m46s
Build Packages / build:rpm (rocky8) (push) Successful in 9m33s
Build Packages / Unit tests (push) Has been skipped
Build Packages / build:rpm (ubuntu2204) (push) Successful in 8m47s
Build Packages / build:rpm (rocky9) (push) Successful in 9m55s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m4s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.124. * jfjoch_broker: Default EIGER readout time is 20 microseconds * jfjoch_broker: Multiple improvements regarding performance * jfjoch_broker: Image buffer allows to track frames in preparation and sending * jfjoch_broker: Dedicated thread for ZeroMQ transmission to better utilize the image buffer * jfjoch_broker: Experimental implementation of transmission with raw TCP/IP sockets * jfjoch_writer: Fixes regarding properly closing files in long data collections * jfjoch_process: Scale & merge has been significantly improved, but it is not yet integrated into mainstream code Reviewed-on: #34
This commit was merged in pull request #34.
This commit is contained in:
@@ -17,6 +17,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());
|
||||
mosaicity.resize(x.GetImageNum(), NAN);
|
||||
}
|
||||
|
||||
IndexAndRefine::IndexingOutcome IndexAndRefine::DetermineLatticeAndSymmetry(DataMessage &msg) {
|
||||
@@ -63,17 +65,14 @@ IndexAndRefine::IndexingOutcome IndexAndRefine::DetermineLatticeAndSymmetry(Data
|
||||
auto latt = indexer_result.lattice[0];
|
||||
auto sg = experiment.GetGemmiSpaceGroup();
|
||||
|
||||
// If space group provided => always enforce symmetry in refinement
|
||||
// If space group and cell provided => always enforce symmetry in refinement
|
||||
// If space group not provided => guess symmetry
|
||||
if (sg) {
|
||||
// If space group provided but no unit cell fixed, it is better to keep triclinic for now
|
||||
if (experiment.GetUnitCell()) {
|
||||
outcome.symmetry = LatticeMessage{
|
||||
.centering = sg->centring_type(),
|
||||
.niggli_class = 0,
|
||||
.crystal_system = sg->crystal_system()
|
||||
};
|
||||
}
|
||||
if (sg && experiment.GetUnitCell()) {
|
||||
outcome.symmetry = LatticeMessage{
|
||||
.centering = sg->centring_type(),
|
||||
.niggli_class = 0,
|
||||
.crystal_system = sg->crystal_system()
|
||||
};
|
||||
outcome.lattice_candidate = latt;
|
||||
} else {
|
||||
auto sym_result = LatticeSearch(latt);
|
||||
@@ -166,8 +165,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{
|
||||
@@ -198,16 +199,15 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
|
||||
[](const Reflection& a, const Reflection& b) { return a.d < b.d; });
|
||||
}
|
||||
|
||||
{
|
||||
std::unique_lock ul(reflections_mutex);
|
||||
reflections[msg.number] = refl_ret; // Image is not processed twice, so thread-safe in principle, but better safe than sorry :)
|
||||
}
|
||||
|
||||
msg.reflections = std::move(refl_ret);
|
||||
|
||||
CalcISigma(msg);
|
||||
CalcWilsonBFactor(msg);
|
||||
|
||||
// Append reflections to the class-wide reflections buffer (thread-safe)
|
||||
{
|
||||
std::unique_lock ul(reflections_mutex);
|
||||
reflections.insert(reflections.end(), msg.reflections.begin(), msg.reflections.end());
|
||||
}
|
||||
}
|
||||
|
||||
void IndexAndRefine::ProcessImage(DataMessage &msg,
|
||||
@@ -242,23 +242,23 @@ std::optional<RotationIndexerResult> IndexAndRefine::Finalize() {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
size_t nrefl = 0;
|
||||
for (const auto &i: reflections)
|
||||
nrefl += i.size();
|
||||
|
||||
// Need a reasonable number of reflections to make refinement meaningful
|
||||
constexpr size_t kMinReflections = 20;
|
||||
if (snapshot.size() < kMinReflections)
|
||||
if (nrefl < 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())
|
||||
if (experiment.GetGoniometer().has_value() && rotation_indexer) {
|
||||
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()) {
|
||||
@@ -267,5 +267,5 @@ std::optional<ScaleMergeResult> IndexAndRefine::ScaleRotationData(const ScaleMer
|
||||
options.space_group = *sg;
|
||||
}
|
||||
|
||||
return ScaleAndMergeReflectionsCeres(snapshot, options);
|
||||
}
|
||||
return ScaleAndMergeReflectionsCeres(reflections, options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user