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>
56 lines
1.5 KiB
C++
56 lines
1.5 KiB
C++
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
#include "CrystalLattice.h"
|
|
#include "UnitCell.h"
|
|
|
|
struct ScanResultElem {
|
|
int64_t number = -1;
|
|
float collection_efficiency = 0.0;
|
|
|
|
std::optional<int64_t> x;
|
|
std::optional<int64_t> y;
|
|
std::optional<float> angle_deg;
|
|
|
|
std::optional<int64_t> pixel_sum;
|
|
std::optional<int64_t> indexed_lattice_count;
|
|
std::optional<int64_t> min_viable_pixel;
|
|
std::optional<int64_t> max_viable_pixel;
|
|
std::optional<int64_t> err_pixels;
|
|
std::optional<int64_t> sat_pixels;
|
|
std::optional<float> bkg;
|
|
std::optional<int64_t> spot_count;
|
|
std::optional<int64_t> spot_count_low_res;
|
|
std::optional<int64_t> spot_count_indexed;
|
|
std::optional<int64_t> spot_count_ice;
|
|
std::optional<int64_t> indexing_solution;
|
|
std::optional<float> profile_radius;
|
|
std::optional<float> b_factor;
|
|
std::optional<float> res;
|
|
std::optional<UnitCell> uc;
|
|
std::optional<uint64_t> xfel_pulse_id;
|
|
std::optional<float> mosaicity;
|
|
std::optional<int64_t> niggli_class;
|
|
std::optional<int64_t> integrated_reflections;
|
|
std::optional<float> image_scale_factor;
|
|
std::optional<float> image_scale_cc;
|
|
std::optional<float> ice_ring_score;
|
|
};
|
|
|
|
struct ScanResult {
|
|
std::string file_prefix;
|
|
std::vector<ScanResultElem> images;
|
|
|
|
std::optional<CrystalLattice> rotation_lattice;
|
|
};
|
|
|
|
|