Stills given a cell: the written cell is the mean over the frames that are merged

GetConsensusUnitCell averaged every indexed frame within 5% of the -C cell. The given-cell
population filter runs after it, so the MTZ, report and model-validation cell was a mixture of
both forms. Frames whose retained outcome is empty now do not count, and the consensus cell is
read again once the population filter has cleared the other form's frames.

Two-form P21 serial data (LCLS):
- T run: 93.85/93.66/49.98/92.00 -> 95.21/94.50/50.42/91.09 (kept population ~95.5/94.1/50.3/91.2)
- S run: 92.38/93.29/49.59/93.26 -> 91.90/93.06/49.45/93.65 (deposited 92.04/93.02/49.01)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu
This commit is contained in:
leonarski_fandClaude Opus 5.5 committed 2026-10-21 19:58:22 +02:00
1 parent 987e812e23
commit 90b1b7a659
2 files changed
+11 -2

No files matched your search

+6 -1
View File
@@ -983,11 +983,16 @@ std::optional<UnitCell> IndexAndRefine::GetConsensusUnitCell() const {
return result->lattice.GetUnitCell();
}
// The cell of the frames that are merged: where the per-image outcomes are kept, a frame the merge
// has left out (its reflections cleared, e.g. by the given-cell population filter) does not count.
std::vector<UnitCell> cells;
{
std::unique_lock ul(reflections_mutex);
cells.reserve(unit_cells.size());
for (const auto &cell: unit_cells) {
for (size_t i = 0; i < unit_cells.size(); i++) {
const auto &cell = unit_cells[i];
if (retain_outcomes_ && integration_outcome[i].reflections.empty())
continue;
if (cell && cell->is_finite())
cells.emplace_back(*cell);
}
+5 -1
View File
@@ -537,10 +537,14 @@ bool Rugnux::ScaleMergeAndSymmetry(PipelineLocals &p) {
(r < low ? below : above)++;
}
}
if (below + above > 0)
if (below + above > 0) {
logger.Info("Given cell: {} of {} indexed frames refined to a cell outside its population "
"({:+.1f}% to {:+.1f}% in volume) and are left out of the merge - {} smaller, {} larger",
below + above, rel.size(), 100 * low, 100 * high, below, above);
// The cell written is the mean over the frames merged, not over the other form's as well.
result.consensus_cell = indexer->GetConsensusUnitCell();
end_msg.unit_cell = result.consensus_cell;
}
}
size_t ice_flagged = 0, ice_total = 0;
{