Apply --min-image-cc merge-consistency filter on the stills merge path
The per-image CC-to-reference filter (--min-image-cc) was only honoured on the rotation merge; the stills merge added every crystal unconditionally. Extend it to stills so the flag is meaningful there too: on flooded frames that produce many spurious lattices (large-cell serial data), the crystals whose per-image CC to the reference falls below the limit are dropped, keeping only the coherent ones in the merge. Opt-in and default-off (limit 0 -> the loop passes cc_filter=false and the merge is bit-identical to before), so no existing behaviour changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -1008,8 +1008,13 @@ ProcessResult Rugnux::RunPipeline(RugnuxObserver *observer, bool write_output, b
|
||||
merge_engine.ErrorModelB(),
|
||||
merge_engine.ErrorModelB() > 0 ? 1.0 / merge_engine.ErrorModelB() : 0.0,
|
||||
merge_engine.ErrorModelChi2());
|
||||
// Merge-consistency filter: on floods with many spurious lattices (e.g. XFEL large cells)
|
||||
// most indexed crystals do not correlate with the true structure; --min-image-cc drops the
|
||||
// crystals whose per-image CC to the reference is below the limit, so the merge keeps only
|
||||
// the coherent (real) ones.
|
||||
const bool cc_filter = !for_search && experiment_.GetScalingSettings().GetMinCCForImage() > 0.0;
|
||||
for (size_t i = 0; i < merge_input.size(); ++i)
|
||||
merge_engine.AddImage(merge_input[i], static_cast<int64_t>(i));
|
||||
merge_engine.AddImage(merge_input[i], static_cast<int64_t>(i), cc_filter);
|
||||
|
||||
ScaleMergeResult out;
|
||||
out.merged = merge_engine.ExportReflections();
|
||||
|
||||
Reference in New Issue
Block a user