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:
@@ -53,6 +53,7 @@ HDF5DataFilePluginMX::HDF5DataFilePluginMX(const StartMessage &msg)
|
||||
|
||||
void HDF5DataFilePluginMX::OpenFile(HDF5File &data_file, const DataMessage &msg, size_t images_per_file) {
|
||||
bkg_estimate.reserve(images_per_file);
|
||||
ice_ring_score.reserve(images_per_file);
|
||||
|
||||
if (max_spots == 0)
|
||||
return;
|
||||
@@ -98,6 +99,8 @@ void HDF5DataFilePluginMX::OpenFile(HDF5File &data_file, const DataMessage &msg,
|
||||
void HDF5DataFilePluginMX::Write(const DataMessage &msg, uint64_t image_number) {
|
||||
if (msg.bkg_estimate.has_value())
|
||||
bkg_estimate[image_number] = msg.bkg_estimate.value();
|
||||
if (msg.ice_ring_score.has_value())
|
||||
ice_ring_score[image_number] = msg.ice_ring_score.value();
|
||||
|
||||
if (max_spots == 0)
|
||||
return;
|
||||
@@ -245,6 +248,8 @@ void HDF5DataFilePluginMX::WriteFinal(HDF5File &data_file) {
|
||||
|
||||
if (!bkg_estimate.empty())
|
||||
data_file.SaveVector("/entry/MX/bkgEstimate", bkg_estimate.vec());
|
||||
if (!ice_ring_score.empty())
|
||||
data_file.SaveVector("/entry/MX/iceRingScore", ice_ring_score.vec());
|
||||
if (!profile_radius.empty())
|
||||
data_file.SaveVector("/entry/MX/profileRadius", profile_radius.vec())->Units("Angstrom^-1");
|
||||
if (!mosaicity_deg.empty())
|
||||
|
||||
Reference in New Issue
Block a user