Files
Jungfraujoch/image_analysis/geom_refinement
jungfrauandClaude Opus 5 7762d8bd30 Build an observation only if the resolution range keeps it, and let the pre-pass skip what it discards
Two changes to what the scaling stage does at all, rather than to how fast it does it.

Ingest converted every integrated partial into the eighty-byte record the scaling works on, and then
threw away whatever fell outside the requested resolution range. On a large cell that is sixty-three
million records built and fifty-seven million discarded - five gigabytes written, most of it to be
skipped by every consumer afterwards. It now emits a twenty-four byte key per observation, sorts and
buckets those, decides from the runs which raw hkl the range keeps, and builds the full record only
for the survivors. The flux meter still sums a frame's whole background in that frame's own order on
one thread, because it is the number every merged intensity is divided by; the first usable d is
still taken over the run rather than over the survivors; and the sort order was already total, so how
the keys are filled cannot change it.

The other is the pre-pass. It exists to choose a space group and post-refine the geometry, and its
merged intensities are discarded - the second pass makes them again at the refined geometry. It was
nonetheless fitting the decay, absorption and modulation surfaces, measuring radiation damage and
sweep quality, assigning R-free flags, converting to amplitudes, walking the observations again for
R_meas, splitting the anomalous pairs and analysing twinning, all for a result nobody reads. A flag
threaded from the call site turns that off on the pre-pass, following the convention the anomalous
split already used.

What the pre-pass keeps is what is read later: the merge itself, the error model, the resolution
cutoff, and the whole per-shell statistics block - because the second pass is judged against the
first, and that guard needs the pre-pass's completeness and CC1/2. The flag that says the statistics
exist is untouched and still set unconditionally; moving it is what disabled the guard entirely in an
earlier attempt at this, and with it the completeness bound, the CC1/2 bound, the lattice-conflict
test and the fall back to the header geometry.

One consequence to be aware of: the pre-pass's CC1/2 is now measured without the correction surfaces
while the second pass's is measured with them, so the two are no longer compared on quite the same
footing. It moves the guard in the direction of firing less readily, never more, so it cannot roll
back a good pass - but it is a small loss of sensitivity and the next commit removes it.

Merged output byte-identical on a large-cell set, a high-multiplicity one and a small one; battery
6m28s against 7m55s, space group unchanged on all 24 crystals.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011n8riB6X59oRjkrSHzNPAU
2026-08-23 14:04:21 -04:00
..
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-06-23 20:29:49 +02:00
2026-06-23 20:29:49 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-06-08 08:30:35 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00