Fix empty spot-plot and resolution percentile in SpotAnalyze

GenerateSpotPlot iterated msg.spots, but SpotAnalyze called it before
assigning output.spots. In the online path the DataMessage is fresh per
frame, so the plot was built from an empty list and spot_plot_intensity
/ spot_plot_count came out all zeros. Pass the finished spots vector
explicitly instead of relying on the field being set: the live path
passes the full pre-truncation list, the HDF5 read-back path passes
message.spots.

GetResolution scaled the 5th-percentile index by spots.size() (which
includes ice-ring spots) while indexing the ice-filtered resolutions
vector, biasing the estimate and reading out of bounds on ice-heavy
frames. Index by resolutions.size() instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-21 09:53:33 +02:00
co-authored by Claude Opus 4.8
parent 67dca388bd
commit 81dbf9a385
3 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -889,7 +889,7 @@ static void ReadSpotsFromFiles(HDF5Object &master_file,
message.spot_count_indexed = ReadElementMasterFirst<uint32_t>(
master_file, source_file, "/entry/MX/peakCountIndexed", master_image, source_image);
GenerateSpotPlot(message, 1.5);
GenerateSpotPlot(message, message.spots, 1.5);
}
void HDF5MetadataSource::FillPerImage(DataMessage &message, int64_t requested_image,