mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-02-19 08:38:41 +01:00
fixed tests
This commit is contained in:
@@ -206,11 +206,20 @@ void RawMasterFile::parse_json(const std::filesystem::path &fpath) {
|
|||||||
|
|
||||||
m_max_frames_per_file = j["Max Frames Per File"];
|
m_max_frames_per_file = j["Max Frames Per File"];
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (v < 8.0) {
|
||||||
m_exptime = string_to<std::chrono::nanoseconds>(
|
m_exptime = string_to<std::chrono::nanoseconds>(
|
||||||
j["Exptime"].get<std::string>());
|
j["Exptime"].get<std::string>());
|
||||||
|
} else {
|
||||||
|
m_exptime = string_to<std::chrono::nanoseconds>(
|
||||||
|
j["Exposure Time"].get<std::string>());
|
||||||
|
}
|
||||||
|
} catch (const json::out_of_range &e) {
|
||||||
|
// keep default 0, Mythen3 not supported yet
|
||||||
|
}
|
||||||
|
|
||||||
m_period = string_to<std::chrono::nanoseconds>(
|
m_period =
|
||||||
j["Period"].get<std::string>());
|
string_to<std::chrono::nanoseconds>(j["Period"].get<std::string>());
|
||||||
|
|
||||||
// Not all detectors write the bitdepth but in case
|
// Not all detectors write the bitdepth but in case
|
||||||
// its not there it is 16
|
// its not there it is 16
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ TEST_CASE("Parse a master file in .raw format", "[.integration]") {
|
|||||||
|
|
||||||
auto fpath =
|
auto fpath =
|
||||||
test_data_path() /
|
test_data_path() /
|
||||||
"moench/"
|
"raw/moench/"
|
||||||
"moench04_noise_200V_sto_both_100us_no_light_thresh_900_master_0.raw";
|
"moench04_noise_200V_sto_both_100us_no_light_thresh_900_master_0.raw";
|
||||||
REQUIRE(std::filesystem::exists(fpath));
|
REQUIRE(std::filesystem::exists(fpath));
|
||||||
RawMasterFile f(fpath);
|
RawMasterFile f(fpath);
|
||||||
@@ -263,7 +263,7 @@ TEST_CASE("Parse a master file in new .json format",
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Read eiger master file", "[.integration]") {
|
TEST_CASE("Read eiger master file", "[.integration]") {
|
||||||
auto fpath = test_data_path() / "eiger" / "eiger_500k_32bit_master_0.json";
|
auto fpath = test_data_path() / "raw/eiger/eiger_500k_32bit_master_0.json";
|
||||||
REQUIRE(std::filesystem::exists(fpath));
|
REQUIRE(std::filesystem::exists(fpath));
|
||||||
RawMasterFile f(fpath);
|
RawMasterFile f(fpath);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user