Two changes to the stills integration background, both stills-only (rotation keeps its path bit for bit):
1. The r2..r3 background ring's outer radius is measured per run. The pre-scan lays apertures on a
grid over its frames, away from every found spot, and for each candidate r3 (r2+2 .. 14) takes the
mean square difference between the r1 disk mean and the clipped ring mean. With nothing in the
aperture that is exactly the background error the ring makes (noise + bias); the run keeps the
minimum. On a photon-counting pixel detector the noise wins and the shipped r3=14 is kept; on a
binned CCD the background structure wins and the narrowest ring is taken. r1 stays 6: a smaller
disk (4,6,14) costs 0.0013 dimple R_free on a JUNGFRAU set, so it does not pass the
photon-counting gate. --adaptive-integration-radius now defaults on for stills too (=off restores
the fixed 6/8/14). The pre-scan bandwidth estimate is not applied to stills.
2. The radial background-curvature correction on stills takes its curve from the adaptive spot
finder's peak-excluded per-ring background (whole frame) instead of the predicted reflections'
own ring pixels, and auto applies it to every stills image (no ice-score gate: a solvent/carrier
hump curves the background as much as ice). New engine call RadialBackgroundFromRings; CPU, GPU
and Metal read the handed-over curve. The GPU box sum now sizes the radial bin index separately
from accumulating, so a handed-over curve is read at the right radius.
Measured (dimple R_free, deposited free set, battery arguments, all frames unless noted):
pal86 (Rayonix 4x4, 156 um): 0.354 -> 0.218 (ring 10; at 4,6,10 0.213)
lcls222 (Rayonix 4x4, 177 um): 0.205 -> 0.196 (ring 10)
sacla236 (MPCCD): 0.2588 -> 0.2558 (ring 11)
alvra213_int16 (JUNGFRAU): 0.1986 -> 0.1986 (ring 14, unchanged)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu