The stills merge of `rugnux --mode scale` (cell form, relabel, ice rings, the
reference-free ambiguity, StillsScaleMerge) moves out of rugnux_cli.cpp into
MergeStills (rugnux/StillsLiveMerge.h), which takes the reflections in memory
and does no file I/O. --mode scale calls it and merges exactly as before
(every report key unchanged on a 129.6k-frame serial set).
StillsLiveMerge makes the same merge for frames that arrive one by one, at a
fixed cost after the last of them. Its first checkpoint is MergeStills on the
frames so far, which leaves them scaled, post-refined and in a consistent
indexing. Every crystal after it is prepared on its own against that
checkpoint's merge: relabelled, placed in its indexing
(ReindexOnReference, the cells' anchoring kept), scaled, and post-refined with
the checkpoint's rocking width and crystal prior
(StillsPartialityRefine::RefineAgainst, one fit per crystal). A later
checkpoint renews the reference from all the crystals so far. After the last
frame the run's indexing is taken as a whole as the cold merge takes it
(RelabelRunIndexing, the global relabel of ResolveReindexReferenceFree factored
out, unchanged), and one merge is made: the error model, started from the last
checkpoint's and fitted in one sampled and one full round
(MergeOnTheFly::ErrorModelStart), the merge, the resolution cut and the
statistics. Nothing iterates until it converges: the checkpoints are a fixed
list and every fit has a fixed number of rounds.
--mode scale --live-checkpoints f1[,f2] replays a stored collection in image
order through these checkpoints and logs the time and CPU time of each part.
On a 129.6k-frame JUNGFRAU 8M serial set (19.3k crystals, 45M observations,
32 threads, quiet machine): the cold merge takes 20.4 s (320 CPU s); with a
checkpoint at 1/2, 3/4 or both, the merge after the last frame takes
3.5-5.2 s (31-44 CPU s), with CC1/2, R_split, <I/sigma>, d_min and
completeness within 0.001, 0.002, 1.5%, 0 and 0 of the cold merge, the merged
intensities correlating with the cold ones at 0.9995 (0.983 in the outermost
shell).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UqXYdL4qBGYRiSXSGXfCLu