mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-10 01:58:41 +01:00
formattin
This commit is contained in:
@@ -208,8 +208,11 @@ defs::xy Detector::getPortPerModuleGeometry() const {
|
||||
Result<defs::xy> Detector::getPortSize(Positions pos) const {
|
||||
Result<defs::xy> res = pimpl->Parallel(&Module::getNumberOfChannels, pos);
|
||||
defs::xy portGeometry = getPortPerModuleGeometry();
|
||||
if ((portGeometry.x != 1 && portGeometry.x != 2) || (portGeometry.y != 1 && portGeometry.y != 2)) {
|
||||
throw RuntimeError("Port size is not 1 or 2 in either dimension. Port geometry:" + ToString(portGeometry));
|
||||
if ((portGeometry.x != 1 && portGeometry.x != 2) ||
|
||||
(portGeometry.y != 1 && portGeometry.y != 2)) {
|
||||
throw RuntimeError(
|
||||
"Port size is not 1 or 2 in either dimension. Port geometry:" +
|
||||
ToString(portGeometry));
|
||||
}
|
||||
for (auto &it : res) {
|
||||
it.x /= portGeometry.x;
|
||||
|
||||
@@ -1783,9 +1783,10 @@ void DetectorImpl::convertGlobalRoiToPortLevel(
|
||||
throw RuntimeError("Only up to 2 ports per module supported.");
|
||||
}
|
||||
if (numPortsPerModule != (int)portRois.size()) {
|
||||
throw RuntimeError("Number of port ROIs does not match number of ports in module. Expected: " +
|
||||
std::to_string(numPortsPerModule) + ", got: " +
|
||||
std::to_string(portRois.size()));
|
||||
throw RuntimeError("Number of port ROIs does not match number of ports "
|
||||
"in module. Expected: " +
|
||||
std::to_string(numPortsPerModule) +
|
||||
", got: " + std::to_string(portRois.size()));
|
||||
}
|
||||
|
||||
for (int port = 0; port != numPortsPerModule; ++port) {
|
||||
@@ -1818,7 +1819,8 @@ void DetectorImpl::convertGlobalRoiToPortLevel(
|
||||
std::min(userRoi.ymax, portRoi.ymax) - portRoi.ymin;
|
||||
}
|
||||
|
||||
// Check if port ROI already exists for this port (from another user roi)
|
||||
// Check if port ROI already exists for this port (from another user
|
||||
// roi)
|
||||
if (!portRois[port].completeRoi() && !portRois[port].noRoi()) {
|
||||
throw RuntimeError(
|
||||
"Multiple ROIs specified for the same port " +
|
||||
|
||||
Reference in New Issue
Block a user