Added parsing of exptime and period from master files (#256)
Build on RHEL9 / build (push) Successful in 3m26s
Build on RHEL8 / build (push) Successful in 3m33s

- New aare:to_string/string_to similar to what we have in
slsDetectorPackage
- Added members period and exptime to RawMasterFile
- Parsing exposure time and period for json and raw master file formats
- Parsing of RawMasterFile from string stream to enable test without
files

Comments:

- to_string is at the moment not a public header. Can make it later if
needed. This gives us full freedom with the API
- FileConfig should probably be deprecated need to look into it.
Meanwhile removed python bindings and string conv
This commit is contained in:
Erik Fröjdh
2025-12-18 17:04:12 +01:00
committed by GitHub
parent fb95e518b4
commit 7f3123d68f
15 changed files with 1185 additions and 437 deletions
+17 -1
View File
@@ -85,5 +85,21 @@ void define_raw_master_file_bindings(py::module &m) {
.def_property_readonly("quad", &RawMasterFile::quad)
.def_property_readonly("scan_parameters",
&RawMasterFile::scan_parameters)
.def_property_readonly("roi", &RawMasterFile::roi);
.def_property_readonly("roi", &RawMasterFile::roi)
.def_property_readonly(
"exptime",
[](RawMasterFile &self) -> std::optional<double> {
if (self.exptime()) {
double seconds =
std::chrono::duration<double>(*self.exptime()).count();
return seconds;
} else {
return std::nullopt;
}
})
.def_property_readonly("period", [](RawMasterFile &self) {
double seconds =
std::chrono::duration<double>(self.period()).count();
return seconds;
});
}