Fixing ROI read of RawFile (#125)

- Bugfixes
- New abstraction for detector geometry
- Tests for updating geo with ROI
This commit is contained in:
Erik Fröjdh
2025-02-11 11:08:22 +01:00
committed by GitHub
parent e96fe31f11
commit 4c750cc3be
11 changed files with 422 additions and 122 deletions

View File

@@ -44,7 +44,7 @@ RawSubFile::RawSubFile(const std::filesystem::path &fname,
void RawSubFile::seek(size_t frame_index) {
if (frame_index >= n_frames) {
throw std::runtime_error("Frame number out of range");
throw std::runtime_error(LOCATION + fmt::format("Frame index {} out of range in a file with {} frames", frame_index, n_frames));
}
m_file.seekg((sizeof(DetectorHeader) + bytes_per_frame()) * frame_index);
}