v1.0.0-rc.103 (#8)
All checks were successful
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 7m51s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 7m19s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 7m46s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 8m32s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 8m6s
Build Packages / build:rpm (rocky8) (push) Successful in 8m7s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 7m37s
Build Packages / Generate python client (push) Successful in 17s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 32s
Build Packages / build:rpm (rocky9) (push) Successful in 9m6s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 6m53s
Build Packages / Unit tests (push) Successful in 1h9m39s

This is an UNSTABLE release.

* jfjoch_viewer: Minor improvements to the viewer
* jfjoch_broker: Change behavior for modular detectors: coordinates of 0-th pixel can be now arbitrary and detector will be cropped to the smallest rectangle limited by module coordinates

Reviewed-on: #8
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #8.
This commit is contained in:
2025-11-19 09:40:50 +01:00
committed by leonarski_f
parent 5c38b2bfe8
commit 33aeb64e4c
158 changed files with 475 additions and 335 deletions

View File

@@ -19,39 +19,38 @@ DetectorModuleGeometry::DetectorModuleGeometry(int64_t in_x0, int64_t in_y0,
if ((dir_x(fast) && dir_x(slow)) || (!dir_x(fast) && !dir_x(slow)))
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"One of axes (fast/slow) has to be X and another one Y.");
if (dir_x(fast) && (fast == Direction::Xneg) && (x0 - fast_pixels + 1 < 0))
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Edge of module in X is outside of the area.");
if (dir_x(slow) && (slow == Direction::Xneg) && (x0 - slow_pixels + 1 < 0))
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Edge of module in X is outside of the area.");
if (dir_x(fast) && (slow == Direction::Yneg) && (y0 - slow_pixels + 1 < 0))
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Edge of module in Y is outside of the area.");
if (dir_x(slow) && (fast == Direction::Yneg) && (y0 - fast_pixels + 1 < 0))
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Edge of module in Y is outside of the area.");
}
int64_t DetectorModuleGeometry::GetMaxX() const {
if (fast == Direction::Xpos)
return x0 + fast_pixels - 1;
else if (slow == Direction::Xpos)
if (slow == Direction::Xpos)
return x0 + slow_pixels - 1;
else
return x0;
return x0;
}
int64_t DetectorModuleGeometry::GetMaxY() const {
if (fast == Direction::Ypos)
return y0 + fast_pixels - 1;
else if (slow == Direction::Ypos)
if (slow == Direction::Ypos)
return y0 + slow_pixels - 1;
else
return y0;
return y0;
}
int64_t DetectorModuleGeometry::GetMinX() const {
if (fast == Direction::Xneg)
return x0 - fast_pixels + 1;
if (slow == Direction::Xneg)
return x0 - slow_pixels + 1;
return x0;
}
int64_t DetectorModuleGeometry::GetMinY() const {
if (fast == Direction::Yneg)
return y0 - fast_pixels + 1;
if (slow == Direction::Yneg)
return y0 - slow_pixels + 1;
return y0;
}
int64_t DetectorModuleGeometry::GetPixel0_X() const {
@@ -86,3 +85,8 @@ void DetectorModuleGeometry::VerticalFlip(std::size_t detector_height) {
y0 = detector_height - y0 - 1;
}
void DetectorModuleGeometry::Translate(int64_t in_x, int64_t in_y) {
x0 += in_x;
y0 += in_y;
}