Merge rc167 into the detection-score branch
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
This commit is contained in:
@@ -516,7 +516,11 @@ namespace {
|
||||
else if (key == "image")
|
||||
r.image_number = GetCBORFloat(map_value);
|
||||
else if (key == "rlp")
|
||||
r.rlp = GetCBORFloat(map_value);
|
||||
r.prescaling_corr = GetCBORFloat(map_value);
|
||||
else if (key == "qe")
|
||||
r.qe_corr = GetCBORFloat(map_value);
|
||||
else if (key == "flight")
|
||||
r.flight_corr = GetCBORFloat(map_value);
|
||||
else if (key == "rp")
|
||||
r.dist_ewald = GetCBORFloat(map_value);
|
||||
else if (key == "partiality")
|
||||
@@ -824,6 +828,8 @@ namespace {
|
||||
message.protein_score = GetCBORFloat(value);
|
||||
else if (key == "ice_score")
|
||||
message.ice_score = GetCBORFloat(value);
|
||||
else if (key == "spindle_blind_fraction")
|
||||
message.spindle_blind_fraction = GetCBORFloat(value);
|
||||
else if (key == "adu_histogram")
|
||||
GetCBORUInt64Array(value, message.adu_histogram);
|
||||
else if (key == "beam_corr_x")
|
||||
@@ -1479,6 +1485,10 @@ namespace {
|
||||
message.adu_histogram_bin_width = GetCBORUInt(value);
|
||||
else if (key == "bkg_estimate")
|
||||
message.bkg_estimate = GetCBORFloat(value);
|
||||
else if (key == "spindle_blind_fraction")
|
||||
message.spindle_blind_fraction = GetCBORFloat(value);
|
||||
else if (key == "spindle_lost_unique_fraction")
|
||||
message.spindle_lost_unique_fraction = GetCBORFloat(value);
|
||||
else if (key == "indexing_rate")
|
||||
message.indexing_rate = GetCBORFloat(value);
|
||||
else if (key == "indexed_lattice_count")
|
||||
@@ -1505,6 +1515,8 @@ namespace {
|
||||
message.protein_score = GetCBORFloat(value);
|
||||
else if (key == "ice_score")
|
||||
message.ice_score = GetCBORFloat(value);
|
||||
else if (key == "v_spindle_blind_fraction")
|
||||
GetCBORFloatArray(value, message.v_spindle_blind_fraction);
|
||||
else if (key == "ice_ring_score")
|
||||
GetCBORFloatArray(value, message.ice_ring_score);
|
||||
else if (key == "spot_count_ice_control")
|
||||
|
||||
Reference in New Issue
Block a user