ADU histogram: Save

This commit is contained in:
2023-10-21 19:51:21 +02:00
parent 53f4f4acf9
commit 99741ae5c5
13 changed files with 125 additions and 41 deletions

View File

@@ -61,6 +61,7 @@ void HDF5DataFile::CreateFile() {
result_group->NXClass("NXcollection");
rad_int_group = std::make_unique<HDF5Group>(*data_file, "/entry/result/rad_int");
adu_histo_group = std::make_unique<HDF5Group>(*data_file, "/entry/result/adu_histogram");
HDF5DataSpace data_space({1, ypixel, xpixel},{H5S_UNLIMITED, ypixel, xpixel});
data_set = std::make_unique<HDF5DataSet>(*data_file, "/entry/data/data", data_type, data_space, dcpl);
@@ -154,6 +155,9 @@ void HDF5DataFile::Write(const DataMessage &msg, uint64_t image_number) {
if (!msg.rad_int_profile.empty() && (msg.rad_int_profile.size() == rad_int_bin_to_q.size()))
rad_int_group->SaveVector("img" + std::to_string(image_number), msg.rad_int_profile);
if (!msg.adu_histogram.empty())
adu_histo_group->SaveVector("img" + std::to_string(image_number), msg.adu_histogram);
}
HDF5DataFileStatistics HDF5DataFile::GetStatistics() const {