v1.0.0-rc.41

This commit is contained in:
2025-06-10 18:14:04 +02:00
parent 72cdbd04a5
commit 41a3e671f4
244 changed files with 3064 additions and 705 deletions

View File

@@ -17,6 +17,8 @@ void HDF5DataFilePluginMX::OpenFile(HDF5File &data_file, const DataMessage &msg)
npeaks.reserve(RESERVE_IMAGES);
strong_pixel_count.reserve(RESERVE_IMAGES);
indexed.reserve(RESERVE_IMAGES);
mosaicity.reserve(RESERVE_IMAGES);
b_factor.reserve(RESERVE_IMAGES);
indexed_lattice.reserve(9 * RESERVE_IMAGES);
spot_count_rings.reserve(RESERVE_IMAGES);
bkg_estimate.reserve(RESERVE_IMAGES);
@@ -53,6 +55,12 @@ void HDF5DataFilePluginMX::Write(const DataMessage &msg, uint64_t image_number)
if (msg.indexing_result.has_value())
indexed[image_number] = msg.indexing_result.value();
if (msg.mosaicity.has_value())
mosaicity[image_number] = msg.mosaicity.value();
if (msg.b_factor.has_value())
b_factor[image_number] = msg.b_factor.value();
if (msg.bkg_estimate.has_value())
bkg_estimate[image_number] = msg.bkg_estimate.value();
@@ -62,9 +70,11 @@ void HDF5DataFilePluginMX::Write(const DataMessage &msg, uint64_t image_number)
if (msg.spot_count_in_rings)
spot_count_rings[image_number] = msg.spot_count_in_rings.value();
if (msg.indexing_lattice.size() == 9) {
if (msg.indexing_lattice) {
auto tmp = msg.indexing_lattice->GetVector();
for (int i = 0; i < 9; i++)
indexed_lattice[image_number * 9 + i] = msg.indexing_lattice[i];
indexed_lattice[image_number * 9 + i] = tmp[i];
}
}
@@ -91,7 +101,10 @@ 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 (!mosaicity.empty())
data_file.SaveVector("/entry/MX/mosaicity", mosaicity.vec());
if (!b_factor.empty())
data_file.SaveVector("/entry/MX/bFactor", b_factor.vec());
if (!resolution_estimate.empty())
data_file.SaveVector("/entry/MX/resolutionEstimate", resolution_estimate.vec());
}