Merge branch 'main' into developer

This commit is contained in:
Erik Fröjdh
2024-11-11 18:52:23 +01:00
committed by GitHub
19 changed files with 233 additions and 8 deletions

View File

@@ -8,8 +8,6 @@ RawFileNameComponents::RawFileNameComponents(
m_base_name = fname.stem();
m_ext = fname.extension();
AARE_ASSERT(false);
if (m_ext != ".json" && m_ext != ".raw") {
throw std::runtime_error(LOCATION +
"Unsupported file type. (only .json or .raw)");
@@ -145,8 +143,10 @@ ScanParameters RawMasterFile::scan_parameters() const {
return m_scan_parameters;
}
std::optional<ROI> RawMasterFile::roi() const { return m_roi; }
void RawMasterFile::parse_json(const std::filesystem::path &fpath) {
std::ifstream ifs(fpath);
json j;
@@ -244,6 +244,7 @@ void RawMasterFile::parse_json(const std::filesystem::path &fpath) {
// not a scan
}
try{
ROI tmp_roi;
auto obj = j.at("Receiver Roi");
@@ -276,6 +277,7 @@ void RawMasterFile::parse_json(const std::filesystem::path &fpath) {
// Update detector type for Moench
// TODO! How does this work with old .raw master files?
#ifdef AARE_VERBOSE