HDF5: Save per reflection scaling factor
This commit is contained in:
@@ -16,7 +16,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_
|
||||
|
||||
std::vector<int32_t> h, k, l;
|
||||
std::vector<float> I, sigma, d, lp;
|
||||
std::vector<float> image, phi, pred_x, pred_y, bkg, partiality, zeta;
|
||||
std::vector<float> image, phi, pred_x, pred_y, bkg, partiality, zeta, scale_factor;
|
||||
|
||||
h.reserve(msg.reflections.size());
|
||||
k.reserve(msg.reflections.size());
|
||||
@@ -32,6 +32,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_
|
||||
image.reserve(msg.reflections.size());
|
||||
phi.reserve(msg.reflections.size());
|
||||
zeta.reserve(msg.reflections.size());
|
||||
scale_factor.reserve(msg.reflections.size());
|
||||
|
||||
for (const auto &refl : msg.reflections) {
|
||||
image.emplace_back(refl.image_number);
|
||||
@@ -48,6 +49,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_
|
||||
partiality.emplace_back(refl.partiality);
|
||||
phi.emplace_back(refl.delta_phi_deg);
|
||||
zeta.emplace_back(refl.zeta);
|
||||
scale_factor.emplace_back(refl.image_scale_corr);
|
||||
}
|
||||
|
||||
std::string image_group_name = fmt::format("image_{:06d}", image_number);
|
||||
@@ -67,6 +69,7 @@ void HDF5DataFilePluginReflection::Write(const DataMessage &msg, uint64_t image_
|
||||
image_group.SaveVector("lp", lp);
|
||||
image_group.SaveVector("partiality", partiality);
|
||||
image_group.SaveVector("zeta", zeta);
|
||||
image_group.SaveVector("image_scale_corr", scale_factor);
|
||||
}
|
||||
|
||||
void HDF5DataFilePluginReflection::WriteFinal(HDF5File &data_file) {
|
||||
|
||||
Reference in New Issue
Block a user