fix for eiger, added python test for testig roi in different module and detector type configurations

This commit is contained in:
2025-06-25 13:41:47 +02:00
parent 8f0c946393
commit 23f8981346
6 changed files with 146 additions and 8 deletions

View File

@@ -155,9 +155,18 @@ void Implementation::setDetectorType(const detectorType d) {
break;
}
if (d == EIGER) {
// resets ROIs and sets size to 2
std::vector<ROI> rois(2);
std::vector<ROI> multiRoi(1);
setPortROIs(rois);
setMultiROIMetadata(multiRoi);
}
SetLocalNetworkParameters();
SetupFifoStructure();
// create threads
for (int i = 0; i < generalData->numUDPInterfaces; ++i) {
@@ -1013,6 +1022,8 @@ int Implementation::getNumberofUDPInterfaces() const {
// not Eiger
void Implementation::setNumberofUDPInterfaces(const int n) {
LOG(logDEBUG) << "Setting Number of UDP Interfaces: " << n;
if (generalData->detType == EIGER) {
throw RuntimeError("Cannot set number of UDP interfaces for Eiger");
}
@@ -1031,10 +1042,9 @@ void Implementation::setNumberofUDPInterfaces(const int n) {
// fifo
SetupFifoStructure();
// roi cleared - complete detector
// roi cleared - complete detector and sets roi vector size
std::vector<ROI> rois(n);
std::vector<ROI> multiRoi(1);
// recalculate port rois booleans for listener, processor and streamer
setPortROIs(rois);
setMultiROIMetadata(multiRoi);

View File

@@ -208,7 +208,7 @@ std::string CreateVirtualHDF5File(
attribute.write(H5::PredType::NATIVE_DOUBLE, &dValue);
// complete detector in roi
if (multiRoi.size() == 1 && multiRoi[0].isComplete()) {
/*if (multiRoi.size() == 1 && multiRoi[0].completeRoi()) {
int ny = nPixelsY * numModY;
int nx = nPixelsX * numModX;
if (nPixelsY == 1) {
@@ -216,7 +216,7 @@ std::string CreateVirtualHDF5File(
} else {
multiRoi.push_back(defs::ROI{0, nx - 1, 0, ny - 1});
}
}
}*/
for (size_t iRoi = 0; iRoi != multiRoi.size(); ++iRoi) {