Both lanes added a per-image scalar to the same eleven files, so every conflict was two
additions competing for one line. All were resolved by keeping both, with three that needed
more than that:
- ScanResultGenerator: rc167 changed the per-image float vectors to resize(n, NAN) so a frame
that never arrived does not read back as a real 0. v_protein_score and v_ice_score are exactly
that case - 0 is a real answer ("nothing detected here") - so they take the NAN default too.
- HDF5MetadataSource: rc167 established that NaN in a stored per-image array means "no value" and
the optional must come back absent. The two detection scores now follow it, which they did not
before the merge; without the guard a missing score would come back as a NaN that a threshold
would silently compare against.
- CBORTest: designated initialisers must follow member declaration order, so spindle_blind_fraction
precedes the two scores in the DataMessage aggregate.
Verified after the merge that every CBOR key that is encoded is also decoded (198 encoded keys,
one intentional exception: the "type" discriminator), that both lanes' fields survive in the
writer, the reader, the plots and the API, and that a stored file still round-trips.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFEJG6WBQv8th4UJFNe53N
33 lines
1.2 KiB
C++
33 lines
1.2 KiB
C++
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <optional>
|
|
|
|
enum class PlotType {
|
|
BkgEstimate, SpindleBlindFraction, AzInt, AzInt1D, SpotCount, SpotCountLowRes, SpotCountIndexed, SpotCountIceRing,
|
|
IndexingRate, IndexingUnitCellLength,
|
|
IndexingUnitCellAngle, ErrorPixels, SaturatedPixels, ImageCollectionEfficiency, ReceiverDelay, ReceiverFreeSendBuf,
|
|
ROISum, ROIMean, ROIMaxCount, ROIPixels, ROIWeightedX, ROIWeightedY, PacketsReceived, MaxValue,
|
|
ResolutionEstimate, ProfileRadius, Mosaicity, BFactor, PixelSum, StrongPixels,
|
|
RefinementBeamX, RefinementBeamY, ImageProcessingTime, IntegratedReflections,
|
|
ImageScaleFactor, ImageScaleCC, CompressionRatio, IndexingLatticeCount, IceRingScore,
|
|
ProteinScore, IceScore
|
|
};
|
|
|
|
enum class PlotAzintUnit {
|
|
Q_recipA, TwoTheta_deg, d_A
|
|
};
|
|
|
|
struct PlotRequest {
|
|
PlotType type = PlotType::BkgEstimate;
|
|
uint64_t binning = 0;
|
|
bool experimental_coord = false;
|
|
PlotAzintUnit azint_unit = PlotAzintUnit::Q_recipA;
|
|
std::optional<float> fill_value;
|
|
};
|