ice score: read back from stored HDF5 (viewer) + write to the NXmx master
The per-image ice_ring_score was written to the data files (HDF5DataFilePluginMX) but the master-file write and the stored-file read path were missing, so opening a processed HDF5 (e.g. in jfjoch_viewer) would not surface it. Mirror bkg_estimate: write /entry/MX/iceRingScore in the NXmx master (HDF5NXmx, from EndMessage), and read it back in HDF5MetadataSource into the dataset (master + data-file reads) and per image into the message. Verified the write; the read is a byte-for-byte mirror of the working bkgEstimate round-trip. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -360,6 +360,7 @@ HDF5MetadataSource::OpenResult HDF5MetadataSource::Open(const std::string &filen
|
||||
|
||||
dataset->indexing_result = master_file->ReadOptVector<float>("/entry/MX/imageIndexed");
|
||||
dataset->bkg_estimate = master_file->ReadOptVector<float>("/entry/MX/bkgEstimate");
|
||||
dataset->ice_ring_score = master_file->ReadOptVector<float>("/entry/MX/iceRingScore");
|
||||
dataset->resolution_estimate = master_file->ReadOptVector<float>("/entry/MX/resolutionEstimate");
|
||||
dataset->profile_radius = master_file->ReadOptVector<float>("/entry/MX/profileRadius");
|
||||
// Master files write indexedLatticeCount; data files / the per-file MX
|
||||
@@ -485,6 +486,10 @@ HDF5MetadataSource::OpenResult HDF5MetadataSource::Open(const std::string &filen
|
||||
data_file, "/entry/MX/bkgEstimate",
|
||||
number_of_images, fimages);
|
||||
|
||||
ReadVector(dataset->ice_ring_score,
|
||||
data_file, "/entry/MX/iceRingScore",
|
||||
number_of_images, fimages);
|
||||
|
||||
ReadVector(dataset->profile_radius,
|
||||
data_file, "/entry/MX/profileRadius",
|
||||
number_of_images, fimages);
|
||||
@@ -933,6 +938,8 @@ void HDF5MetadataSource::FillPerImage(DataMessage &message, int64_t requested_im
|
||||
message.indexing_lattice_count = dataset->indexing_lattice_count[image_number];
|
||||
if (dataset->bkg_estimate.size() > image_number)
|
||||
message.bkg_estimate = dataset->bkg_estimate[image_number];
|
||||
if (dataset->ice_ring_score.size() > image_number)
|
||||
message.ice_ring_score = dataset->ice_ring_score[image_number];
|
||||
if (dataset->efficiency.size() > image_number)
|
||||
message.image_collection_efficiency = dataset->efficiency[image_number];
|
||||
if (dataset->profile_radius.size() > image_number)
|
||||
|
||||
Reference in New Issue
Block a user