mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-13 07:47:13 +02:00
reading raw moench files (PR#3) (#32)
* reading moench and raw files * read mythen3 files * read multiport mythen3 * delete .vscode and .env.dev --------- Co-authored-by: Bechir <bechir.brahem420@gmail.com>
This commit is contained in:
@ -11,7 +11,7 @@ add_library(core STATIC ${SourceFiles})
|
||||
target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
|
||||
target_link_libraries(core PUBLIC fmt::fmt PRIVATE aare_compiler_flags)
|
||||
target_link_libraries(core PUBLIC fmt::fmt PRIVATE aare_compiler_flags utils)
|
||||
|
||||
if (AARE_PYTHON_BINDINGS)
|
||||
set_property(TARGET core PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
@ -29,5 +29,5 @@ if(AARE_TESTS)
|
||||
|
||||
)
|
||||
target_sources(tests PRIVATE ${TestSources} )
|
||||
target_link_libraries(tests PRIVATE core)
|
||||
target_link_libraries(tests PRIVATE core )
|
||||
endif()
|
@ -34,7 +34,7 @@ struct xy {
|
||||
// using image_shape = std::array<ssize_t, 2>;
|
||||
using dynamic_shape = std::vector<ssize_t>;
|
||||
|
||||
enum class DetectorType { Jungfrau, Eiger, Mythen3, Moench };
|
||||
enum class DetectorType { Jungfrau, Eiger, Mythen3, Moench,ChipTestBoard };
|
||||
|
||||
enum class TimingMode {Auto, Trigger};
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "aare/Frame.hpp"
|
||||
#include "aare/utils/logger.hpp"
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
Frame::Frame(std::byte* bytes, ssize_t rows, ssize_t cols, ssize_t bitdepth):
|
||||
|
@ -10,13 +10,14 @@ template <> std::string toString(DetectorType type) {
|
||||
return "Mythen3";
|
||||
case DetectorType::Moench:
|
||||
return "Moench";
|
||||
case DetectorType::ChipTestBoard:
|
||||
return "ChipTestBoard";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <> DetectorType StringTo(std::string name) {
|
||||
template <> DetectorType StringTo(std::string name) {
|
||||
if (name == "Jungfrau")
|
||||
return DetectorType::Jungfrau;
|
||||
else if (name == "Eiger")
|
||||
@ -25,18 +26,20 @@ template <> std::string toString(DetectorType type) {
|
||||
return DetectorType::Mythen3;
|
||||
else if (name == "Moench")
|
||||
return DetectorType::Moench;
|
||||
else if (name == "ChipTestBoard")
|
||||
return DetectorType::ChipTestBoard;
|
||||
else {
|
||||
auto msg = fmt::format("Could not decode dector from: \"{}\"", name);
|
||||
throw std::runtime_error(msg);
|
||||
}
|
||||
}
|
||||
|
||||
template <> TimingMode StringTo(std::string mode){
|
||||
template <> TimingMode StringTo(std::string mode) {
|
||||
if (mode == "auto")
|
||||
return TimingMode::Auto;
|
||||
else if(mode == "trigger")
|
||||
else if (mode == "trigger")
|
||||
return TimingMode::Trigger;
|
||||
else{
|
||||
else {
|
||||
auto msg = fmt::format("Could not decode timing mode from: \"{}\"", mode);
|
||||
throw std::runtime_error(msg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user