From 9a3add00962518f5a25f8144aa607c1df0450e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Fr=C3=B6jdh?= Date: Thu, 18 Dec 2025 14:16:41 +0100 Subject: [PATCH] again tests --- src/RawMasterFile.cpp | 10 +++++++--- src/RawMasterFile.test.cpp | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/RawMasterFile.cpp b/src/RawMasterFile.cpp index dd3bf55..45f433d 100644 --- a/src/RawMasterFile.cpp +++ b/src/RawMasterFile.cpp @@ -218,9 +218,13 @@ void RawMasterFile::parse_json(const std::filesystem::path &fpath) { // keep default 0, Mythen3 not supported yet } - m_period = - string_to(j["Period"].get()); - + if (v < 8.0) { + m_period = + string_to(j["Period"].get()); + } else { + m_period = string_to( + j["Acquisition Period"].get()); + } // Not all detectors write the bitdepth but in case // its not there it is 16 try { diff --git a/src/RawMasterFile.test.cpp b/src/RawMasterFile.test.cpp index 7d2d75d..7fdcaf7 100644 --- a/src/RawMasterFile.test.cpp +++ b/src/RawMasterFile.test.cpp @@ -164,7 +164,7 @@ TEST_CASE("Parse a master file in .raw format", "[.integration]") { auto fpath = test_data_path() / - "raw/moench/" + "raw/moench04/" "moench04_noise_200V_sto_both_100us_no_light_thresh_900_master_0.raw"; REQUIRE(std::filesystem::exists(fpath)); RawMasterFile f(fpath);