DiffractionExperiment: Max image number is 2 million + 1; it is unsafe to collect more
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user