mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-02-20 18:28:41 +01:00
Added parsing of exptime and period from master files (#256)
- 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:
@@ -66,7 +66,7 @@ void define_file_io_bindings(py::module &m) {
|
||||
.def_property_readonly("bytes_per_pixel", &File::bytes_per_pixel)
|
||||
.def_property_readonly(
|
||||
"detector_type",
|
||||
[](File &self) { return ToString(self.detector_type()); })
|
||||
[](File &self) { return self.detector_type(); })
|
||||
.def("read_frame",
|
||||
[](File &self) {
|
||||
const uint8_t item_size = self.bytes_per_pixel();
|
||||
@@ -161,21 +161,6 @@ void define_file_io_bindings(py::module &m) {
|
||||
}
|
||||
});
|
||||
|
||||
py::class_<FileConfig>(m, "FileConfig")
|
||||
.def(py::init<>())
|
||||
.def_readwrite("rows", &FileConfig::rows)
|
||||
.def_readwrite("cols", &FileConfig::cols)
|
||||
.def_readwrite("version", &FileConfig::version)
|
||||
.def_readwrite("geometry", &FileConfig::geometry)
|
||||
.def_readwrite("detector_type", &FileConfig::detector_type)
|
||||
.def_readwrite("max_frames_per_file", &FileConfig::max_frames_per_file)
|
||||
.def_readwrite("total_frames", &FileConfig::total_frames)
|
||||
.def_readwrite("dtype", &FileConfig::dtype)
|
||||
.def("__eq__", &FileConfig::operator==)
|
||||
.def("__ne__", &FileConfig::operator!=)
|
||||
.def("__repr__", [](const FileConfig &a) {
|
||||
return "<FileConfig: " + a.to_string() + ">";
|
||||
});
|
||||
|
||||
py::class_<ScanParameters>(m, "ScanParameters")
|
||||
.def(py::init<const std::string &>())
|
||||
|
||||
Reference in New Issue
Block a user