ice score: per-image ice-ring indicator plumbed through all layers

A single per-image ice_ring_score - the strongest hexagonal-ice ring band/shoulder
intensity ratio from the azimuthal profile (1 = no ice) - computed in the CPU and
FPGA analysis paths and the offline azint worker, then plumbed through every layer:
DataMessage/EndMessage, CBOR (frame_serialize), HDF5 (/entry/MX/iceRingScore),
ScanResult, receiver plots (PlotType::IceRingScore), the OpenAPI spec (plot_type +
scan_result schema, with regenerated broker/gen and frontend client) and
OpenAPIConvert, the reader + Qt viewer, and the React frontend plot. Documented in
docs/CBOR.md, docs/HDF5.md and docs/CPU_DATA_ANALYSIS.md, with the general
"add a per-image quantity" recipe added to CLAUDE.md.

Verified in HDF5: lysoC (weak ice) mean 1.23, EP_cs_01-17 (heavy ice) mean 1.67 /
max 2.23. This is a monitoring quantity - it does not gate scaling (which already
excludes all ice rings) or merging (handled by the CC1/2 ring mask).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 16:37:12 +02:00
co-authored by Claude Fable 5
parent 6ffb16f142
commit f422988cd2
30 changed files with 165 additions and 8 deletions
+3
View File
@@ -62,6 +62,7 @@ void ScanResultGenerator::Add(const DataMessage &message) {
v[image_number].integrated_reflections = message.integrated_reflections;
v[image_number].image_scale_factor = message.image_scale_factor;
v[image_number].image_scale_cc = message.image_scale_cc;
v[image_number].ice_ring_score = message.ice_ring_score;
if (message.lattice_type)
v[image_number].niggli_class = message.lattice_type->niggli_class;
}
@@ -103,6 +104,7 @@ void ScanResultGenerator::FillEndMessage(EndMessage &message) const {
message.error_pixel_count.resize(n);
message.image_scale_factor.resize(n);
message.image_scale_cc.resize(n);
message.ice_ring_score.resize(n);
message.integrated_reflections.resize(n);
message.niggli_class.resize(n);
message.pixel_sum.resize(n);
@@ -133,6 +135,7 @@ void ScanResultGenerator::FillEndMessage(EndMessage &message) const {
message.error_pixel_count[number] = static_cast<int32_t>(value_or_zero(e.err_pixels));
message.image_scale_factor[number] = e.image_scale_factor.value_or(NAN);
message.image_scale_cc[number] = e.image_scale_cc.value_or(NAN);
message.ice_ring_score[number] = e.ice_ring_score.value_or(NAN);
message.integrated_reflections[number] = static_cast<int32_t>(value_or_zero(e.integrated_reflections));
message.niggli_class[number] = static_cast<uint8_t>(value_or_zero(e.niggli_class));
message.pixel_sum[number] = value_or_zero(e.pixel_sum);