Files
Jungfraujoch/image_analysis/bragg_integration
leonarski_fandClaude Opus 5 ecb0571d8d integration: the observed centroid is the signal's, not the disk's
The centroid was a first moment of the RAW counts over the signal disk, so it weighted signal plus
background. The background is flat over a disk centred on the PREDICTION, which makes its own centroid
the prediction exactly: it adds nothing to the displacement and everything to the denominator, and the
measured offset comes out shrunk by I/(I + n*bkg).

That factor is worst where the background dominates the signal, which is at high resolution - so the
one consumer of this quantity, the geometry post-refinement, fits the beam centre and the detector
distance on displacements that are systematically too small, by a factor that varies with resolution.
An estimator whose bias depends on the very coordinate it is correcting.

Subtracting a flat pedestal from a first moment is exact, and the background is not known until the
ring has been read, so the positions of the pixels behind the intensity sum are accumulated alongside
it and the correction is applied afterwards: sum(x*(px-bkg)) = sum(x*px) - bkg*sum(x). Both engines,
identically. Where nothing rises above background there is no signal centroid to compute and the raw
one is kept.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFEJG6WBQv8th4UJFNe53N
2026-09-01 19:55:47 +02:00
..
2026-08-25 08:21:39 +02:00
2026-08-26 22:47:00 +02:00
2026-08-26 22:47:00 +02:00
2026-08-25 08:21:39 +02:00
2026-08-25 08:21:39 +02:00
2026-07-03 19:18:56 +02:00
2026-06-08 08:30:35 +02:00
2026-02-01 13:29:33 +01:00