version 1.0.0-rc.25

This commit is contained in:
2024-11-22 21:25:20 +01:00
parent bebcc634da
commit 28d224afab
484 changed files with 3134 additions and 613 deletions
+15 -6
View File
@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include <cmath>
#include <utility>
@@ -457,11 +458,11 @@ std::optional<std::chrono::microseconds> DiffractionExperiment::GetZMQPreviewPer
}
int64_t DiffractionExperiment::GetDefaultPlotBinning() const {
auto tmp = 500ms / GetImageTime();
if (GetImageNum() / tmp >= 10)
return tmp; // 1 bin == 500 ms
else
return 1; // no binning if less than 10 bins with 200 ms
// If images are equal longer than 100 ms, don't bin images
// If data collection is shorter than 5s, don't bin
if ((GetImageTime() >= 100ms) || (GetImageNum() * GetImageTime() < 5s))
return 1;
return 500ms / GetImageTime(); // 1 bin == 500 ms
}
bool DiffractionExperiment::IsUsingInternalPacketGen() const {
@@ -651,6 +652,14 @@ void DiffractionExperiment::FillMessage(StartMessage &message) const {
message.write_master_file = dataset.IsWriteNXmxHDF5Master();
message.channels = {"default"};
if (GetDetectorType() == DetectorType::JUNGFRAU)
message.jungfrau_conversion_enabled = IsJungfrauConvPhotonCnt();
if (IsJungfrauConvPhotonCnt())
message.jungfrau_conversion_factor = GetPhotonEnergyForConversion_keV() * 1000;
message.geometry_transformation_enabled = IsGeometryTransformed();
}
float DiffractionExperiment::GetPixelSize_mm() const {