Files
Jungfraujoch/tools
leonarski_fandClaude Opus 5.5 dda86080e2 BackgroundGain: one gain estimate for rotation and stills; the still battery no longer gives EuXFEL 152 its gain
background_gain::Estimate is the gain of any input that reports detector units: the photon peaks where
the histogram of a few frames shows them (PhotonPeak), else the background's variance per unit mean
(Gain). The stills reader path (MeasureGain) and the pre-scan's CCD measurement now both call it, so a
rotation sweep and a still read the same number from the same frames.

On a CCD the photon-peak test now also sees the pixels outside the active area, all at zero: on one
Saturn sweep that spike, the background hump far above it and the hump's echo at twice the value passed
as photon peaks (gain 2725). A zero-photon peak is the detector's noise and has a width, so a single bin
with nothing beside it is refused. Checked on the 39 SMV/marCCD sets of the battery: every pre-scan
gain is the same as rc178's (no photon peaks; the variance per unit mean as before).

Where the gain is applied stays as it is: a stills file is converted to photons as it is read (the
spot finder and the stills measurements of spot width, bandwidth and partiality work in photons), a
rotation CCD sweep keeps its raw counts and the gain enters the integrator (pixel_gain, 46da7fb35).
Moving the stills to the integrator route too was tried (stills PixelGain, no reader conversion) and
lost badly on MPCCD: R-free +0.032 and +0.047 on two SACLA sets, R_split 0.055 -> 0.091 and 0.067 ->
0.144, with the indexing unchanged; the stills rocking width/bandwidth fit, measured on frames in ADU,
collapsed (bandwidth 0.0015 -> 0.0000).

still_manifest.json: euxfel152 drops --gain 62; the gain is now read off its photon peaks (62.65, on a
baseline of 124.2 left in the frames): R-free 0.252, the same as with --gain 62.649 or 61.5 given by
hand (0.252, 0.252); --gain 62 gives 0.2495 - the R-free moves by ~0.003 with the gain. 66.4% indexed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu
2026-10-23 04:01:11 +02:00
..
2026-06-23 20:29:49 +02:00
2026-10-16 15:34:43 +02:00
2026-10-16 15:34:43 +02:00
2026-09-09 07:25:13 +02:00
2026-06-23 20:29:49 +02:00
2026-05-06 21:50:02 +02:00
2026-07-19 09:39:28 +02:00
2025-09-08 20:28:59 +02:00
2025-04-14 11:52:06 +02:00
2026-07-03 19:18:56 +02:00
2026-08-25 08:21:39 +02:00
2026-10-16 15:34:43 +02:00
2024-11-22 21:25:20 +01:00
2026-10-16 15:34:43 +02:00
2026-10-16 15:34:43 +02:00
2024-11-26 16:04:38 +01:00
2026-06-08 08:30:35 +02:00
2026-09-22 06:48:37 +02:00
2026-06-08 08:30:35 +02:00