Files
Jungfraujoch/tests
leonarski_fandClaude Opus 5 eb0cb42355 Make the saturation limit convert once, in one place
The limit is EXCLUSIVE inside Jungfraujoch - the first value that is no longer a count - and NXmx
saturation_value is INCLUSIVE, the highest value that still is one. XDS OVERLOAD and the DIALS
trusted_range read it inclusively too. The write side subtracted the count and no read side added it
back, so the value fell by one on every write-read-write cycle, unbounded: four chained runs over one
dataset gave 32766, 32765, 32764, 32763. It also fed the preprocessor, so one more real count was
called saturated after each cycle.

SaturationValueFromLimit / SaturationLimitFromValue now carry the conversion, used by the writer and
by all three readers (HDF5, the lite receiver, the viewer). JFJochReaderImage's summation test moves
from > to >= in the same commit: it was silently compensating for the missing count, and correcting
one without the other would have shifted it instead.

Two more places said the wrong thing about the same pixels:

error_value was GetUnderflow(), which is -1 for an unsigned image - a value no unsigned pixel can
hold. The marker those images really carry is UINTx_MAX, and GetImageFillValue() already returned it,
so the class held two disagreeing definitions of one marker.

bit_depth_readout is now written for unsigned images only. DIALS remaps the top two codes of
2^bit_depth_readout to -1 and -2 whenever the field is present, without looking at the pixel type.
For an unsigned image those fall below underload_value and are masked, which is what we want. For a
signed one they land INSIDE the trusted range, so a saturated pixel reached DIALS as a trusted count
of -2 - on the strongest reflections. Verified with DIALS 3.27: an int32 file now masks both
sentinels. The field stays where it earns its keep, since dxtbx cannot read unsigned 32-bit without
it.

Neither the values themselves nor the wire format change. Verified against NXmx, DECTRIS SIMPLON,
Durin (Global Phasing fork), XDS and DIALS 3.27; the chained run now holds at 32766.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VfYvJT5Nb71suJCowRBn5z
2026-08-23 11:58:40 +02:00
..
2026-08-13 17:03:10 +02:00
2026-07-19 09:39:28 +02:00
2026-07-19 09:39:28 +02:00
2026-04-09 13:30:47 +02:00
2024-10-05 13:14:49 +02:00
2024-10-05 13:14:49 +02:00
2025-05-05 19:32:22 +02:00
2026-08-13 17:03:10 +02:00
2026-04-29 09:50:50 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-05-28 18:48:35 +02:00
2025-05-05 19:32:22 +02:00
2026-08-13 17:03:10 +02:00
2025-06-10 18:14:04 +02:00
2026-06-08 08:30:35 +02:00
2025-11-19 09:40:50 +01:00
2026-04-29 09:50:50 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2024-11-22 21:25:20 +01:00
2025-10-20 20:43:44 +02:00
2025-04-14 11:52:06 +02:00
2025-11-09 12:42:27 +01:00
2025-09-08 20:28:59 +02:00
2025-09-08 20:28:59 +02:00
2025-03-24 12:16:33 +01:00
2026-07-13 13:54:03 +02:00
2025-06-18 15:19:18 +02:00
2025-11-19 17:28:10 +01:00
2025-12-12 21:24:20 +01:00
2026-02-01 13:29:33 +01:00
2026-03-03 22:24:44 +01:00
2025-11-19 09:40:50 +01: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
2025-05-05 19:32:22 +02:00
2024-11-22 21:25:20 +01:00
2026-04-29 09:50:50 +02:00
2024-11-22 21:25:20 +01:00
2025-05-28 18:49:27 +02:00
2026-06-23 20:29:49 +02:00
2025-10-20 20:43:44 +02:00
2024-11-22 21:25:20 +01:00
2026-08-13 17:03:10 +02:00
2025-03-02 13:15:28 +01:00
2026-06-08 08:30:35 +02:00
2025-11-09 12:42:27 +01:00
2026-08-13 17:03:10 +02:00
2024-11-22 21:25:20 +01:00
2025-11-09 12:42:27 +01:00
2025-10-01 22:54:40 +02:00
2026-07-13 13:54:03 +02:00
2025-10-20 20:43:44 +02:00
2026-08-13 17:03:10 +02:00
2026-07-13 13:54:03 +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-06-23 20:29:49 +02:00
2026-06-02 11:49:24 +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
2025-10-20 20:43:44 +02:00
2026-03-02 15:57:12 +01:00
2025-11-09 12:42:27 +01:00
2025-11-09 12:42:27 +01:00
2026-07-11 07:19:11 +02:00
2026-06-23 20:29:49 +02:00
2026-04-16 11:59:59 +02:00
2026-06-23 20:29:49 +02:00
2025-11-02 13:45:57 +01:00
2025-12-12 21:24:20 +01:00
2026-05-28 18:48:35 +02:00
2026-08-13 17:03:10 +02:00
2026-07-19 09:39:28 +02:00
2026-03-05 22:13:12 +01:00
2026-03-26 20:50:33 +01:00
2024-11-22 21:25:20 +01:00
2026-08-13 17:03:10 +02:00