DiffractionExperiment: Max image number is 2 million + 1; it is unsafe to collect more

This commit is contained in:
2026-05-08 17:46:20 +02:00
parent cd5d97aa55
commit f5176b56a9
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -17,6 +17,8 @@ constexpr size_t CONVERTED_MODULE_COLS = 1030;
constexpr size_t CONVERTED_MODULE_SIZE = CONVERTED_MODULE_LINES * CONVERTED_MODULE_COLS;
constexpr size_t JUNGFRAU_PACKET_SIZE_BYTES = 8192;
constexpr int MAX_IMAGE_NUMBER = 2*1024*1024;
constexpr std::chrono::nanoseconds MIN_COUNT_TIME = std::chrono::microseconds(3);
constexpr std::chrono::nanoseconds MIN_STORAGE_CELL_DELAY = std::chrono::nanoseconds(2100);
constexpr std::chrono::nanoseconds MIN_FRAME_TIME_JUNGFRAU_HALF_SPEED = std::chrono::microseconds(1000);
+6
View File
@@ -1060,6 +1060,12 @@ DiffractionExperiment &DiffractionExperiment::ImportDatasetSettings(const Datase
+ std::to_string(MAX_FRAMES));
}
if (GetImageNum() > MAX_IMAGE_NUMBER) {
dataset = tmp;
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Number of images cannot exceed " + std::to_string(MAX_IMAGE_NUMBER));
}
return *this;
}