version 1.0.0-rc.25
This commit is contained in:
@@ -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 <catch2/catch_all.hpp>
|
||||
|
||||
@@ -947,16 +948,24 @@ TEST_CASE("DiffractionExperiment_GetDefaultPlotBinning", "[DiffractionExperiment
|
||||
x.FrameTime(std::chrono::milliseconds(1));
|
||||
|
||||
x.ImagesPerTrigger(5000);
|
||||
CHECK(x.GetDefaultPlotBinning() == 500); // 500 x 1 us = 500 us
|
||||
CHECK(x.GetDefaultPlotBinning() == 500); // 5000 x 1 ms = 5 s, so binning of 500 ms
|
||||
|
||||
x.Summation(2).ImagesPerTrigger(2500);
|
||||
CHECK(x.GetDefaultPlotBinning() == 250); // 250 x 2 us = 500 us
|
||||
CHECK(x.GetDefaultPlotBinning() == 250); // 2500 x 1 ms = 5 s, so binning of 500 ms
|
||||
|
||||
x.ImagesPerTrigger(2499);
|
||||
x.ImagesPerTrigger(2499); // less than 5s, no binning
|
||||
CHECK(x.GetDefaultPlotBinning() == 1);
|
||||
|
||||
x.ImagesPerTrigger(1);
|
||||
x.ImagesPerTrigger(1); // 1 image, no binning
|
||||
CHECK(x.GetDefaultPlotBinning() == 1);
|
||||
|
||||
x.Detector(DetectorSetup(DetectorGeometry(4), DetectorType::EIGER));
|
||||
DatasetSettings ds;
|
||||
ds.ImageTime(1s);
|
||||
REQUIRE_NOTHROW(x.ImportDatasetSettings(ds));
|
||||
|
||||
x.ImagesPerTrigger(10000); // 10k images, but with 1s image time, there should be no binning in any case
|
||||
REQUIRE(x.GetDefaultPlotBinning() == 1);
|
||||
}
|
||||
|
||||
TEST_CASE("DiffractionExperiment_ImportDataset_TooManyFrames", "[DiffractionExperiment]") {
|
||||
|
||||
Reference in New Issue
Block a user