v1.0.0-rc.36

This commit is contained in:
2025-05-05 19:32:22 +02:00
parent 759243d1bf
commit 040cf08386
333 changed files with 22724 additions and 15251 deletions

View File

@@ -20,6 +20,7 @@ void HDF5DataFilePluginMX::OpenFile(HDF5File &data_file, const DataMessage &msg)
indexed_lattice.reserve(9 * RESERVE_IMAGES);
spot_count_rings.reserve(RESERVE_IMAGES);
bkg_estimate.reserve(RESERVE_IMAGES);
resolution_estimate.reserve(RESERVE_IMAGES);
}
void HDF5DataFilePluginMX::Write(const DataMessage &msg, uint64_t image_number) {
@@ -48,7 +49,12 @@ void HDF5DataFilePluginMX::Write(const DataMessage &msg, uint64_t image_number)
npeaks[image_number] = spot_cnt;
strong_pixel_count[image_number] = msg.strong_pixel_count;
indexed[image_number] = msg.indexing_result;
bkg_estimate[image_number] = msg.bkg_estimate.value_or(0.0f);
if (msg.bkg_estimate.has_value())
bkg_estimate[image_number] = msg.bkg_estimate.value();
if (msg.resolution_estimate.has_value())
resolution_estimate[image_number] = msg.resolution_estimate.value();
if (msg.spot_count_in_rings)
spot_count_rings[image_number] = msg.spot_count_in_rings.value();
@@ -81,4 +87,7 @@ void HDF5DataFilePluginMX::WriteFinal(HDF5File &data_file) {
data_file.SaveVector("/entry/MX/latticeIndexed", indexed_lattice, {(hsize_t) (max_image_number + 1), 9});
if (!bkg_estimate.empty())
data_file.SaveVector("/entry/MX/bkgEstimate", bkg_estimate.vec());
if (!resolution_estimate.empty())
data_file.SaveVector("/entry/MX/resolutionEstimate", resolution_estimate.vec());
}