From 57fc38195e7702570f0ec53011913b7bdb36dc4e Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Tue, 2 Jun 2026 18:36:46 +0200 Subject: [PATCH] Save Pixel-to-bin map in JFJochReceiver, and write it compressed in the master file --- common/AzimuthalIntegrationMapping.h | 2 +- receiver/JFJochReceiver.cpp | 5 ++++- writer/HDF5NXmx.cpp | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/common/AzimuthalIntegrationMapping.h b/common/AzimuthalIntegrationMapping.h index 3203187e..eddab1f7 100644 --- a/common/AzimuthalIntegrationMapping.h +++ b/common/AzimuthalIntegrationMapping.h @@ -42,7 +42,7 @@ public: size_t nthreads = 0); [[nodiscard]] uint16_t GetBinNumber() const; - [[nodiscard]] const std::vector&GetPixelToBin() const; + [[nodiscard]] const std::vector& GetPixelToBin() const; [[nodiscard]] const std::vector &GetBinToQ() const; [[nodiscard]] const std::vector &GetBinToD() const; [[nodiscard]] const std::vector &GetBinToTwoTheta() const; diff --git a/receiver/JFJochReceiver.cpp b/receiver/JFJochReceiver.cpp index ba6d05f4..da9367c9 100644 --- a/receiver/JFJochReceiver.cpp +++ b/receiver/JFJochReceiver.cpp @@ -115,12 +115,15 @@ void JFJochReceiver::SendStartMessage() { message.az_int_bin_to_q = az_int_mapping->GetBinToQ(); message.az_int_bin_to_two_theta = az_int_mapping->GetBinToTwoTheta(); message.az_int_phi_bin_count = az_int_mapping->GetAzimuthalBinCount(); - if (az_int_mapping->GetAzimuthalBinCount() > 1) + if (az_int_mapping->GetAzimuthalBinCount() > 1) { message.az_int_bin_to_phi = az_int_mapping->GetBinToPhi(); + message.az_int_map = az_int_mapping->GetPixelToBin(); + } message.writer_notification_zmq_addr = image_pusher.GetWriterNotificationSocketAddress(); message.rois = experiment.ROI().ExportMetadata(); message.max_spot_count = experiment.GetMaxSpotCount(); + std::vector nexus_mask; message.pixel_mask["default"] = pixel_mask.GetMask(experiment); diff --git a/writer/HDF5NXmx.cpp b/writer/HDF5NXmx.cpp index 0a119323..5a45a78c 100644 --- a/writer/HDF5NXmx.cpp +++ b/writer/HDF5NXmx.cpp @@ -726,7 +726,8 @@ void NXmx::AzimuthalIntegration(const StartMessage &start, const EndMessage &end } if (!start.az_int_map.empty() && start.az_int_map.size() == start.image_size_y * start.image_size_x) - az_int_group.SaveVector("map", start.az_int_map, {start.image_size_y, start.image_size_x}); + az_int_group.SaveVector("map", start.az_int_map, {start.image_size_y, start.image_size_x}, + CompressionAlgorithm::BSHUF_LZ4); } }