Merge branch 'rc178-still-results' into panel-s5
# Conflicts: # reader/JFJochXFELReader.cpp # tests/XFELReaderTest.cpp
This commit is contained in:
commit
64f6b7a5c4
7 files changed
+222
-23
No files matched your search
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
#include <catch2/catch_all.hpp>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
@@ -94,6 +95,7 @@ TEST_CASE("JFJochXFELReader_SACLA", "[portable]") {
|
||||
frame[8 * 4] = -5; // second sensor (fs 0, ss 0): below zero
|
||||
frame[8 * 4 + 1] = 33; // second sensor (fs 1, ss 0)
|
||||
frame[9 * 4] = 44; // second sensor (fs 0, ss 1)
|
||||
frame[2 * 4] = INT16_MIN; // first sensor (fs 0, ss 2): no measurement
|
||||
WriteFrames(g, "data", H5T_NATIVE_INT16, frame.data(), {16, 4});
|
||||
WriteScalar(g, "photon_energy_ev", 10000.0 + 10.0 * shot);
|
||||
H5Gclose(g);
|
||||
@@ -123,6 +125,8 @@ TEST_CASE("JFJochXFELReader_SACLA", "[portable]") {
|
||||
CHECK(PixelAt(reader, 0, 21, 3, int16) == 33);
|
||||
CHECK(PixelAt(reader, 0, 20, 2, int16) == 44);
|
||||
CHECK(PixelAt(reader, 0, 0, 0, int16) == 0); // between the panels
|
||||
// The smallest int16 is no measurement, not a count (handed out as Int16, whose error value it is).
|
||||
CHECK(PixelAt(reader, 0, 2, 4, int16) == INT16_MIN);
|
||||
// The file's mask holds the first sensor's (fs 1, ss 0), at column 3, row 2.
|
||||
const auto &mask = reader.GetDataset()->pixel_mask->GetMask();
|
||||
CHECK(mask[2 * x.GetXPixelsNum() + 3] != 0);
|
||||
|
||||
Reference in new issue
Block a user