jfjoch_viewer: Don't show diffraction rings entirely outside of the detector

This commit is contained in:
2025-11-06 10:49:54 +01:00
parent 2b372ba794
commit 35dcbd1971
+10
View File
@@ -368,7 +368,17 @@ void JFJochViewerImage::DrawResolutionRings() {
float phi_offset = 0;
float res1 = geom.PxlToRes(0,0);
float res2 = geom.PxlToRes(image->Dataset().experiment.GetXPixelsNum(),0);
float res3 = geom.PxlToRes(image->Dataset().experiment.GetXPixelsNum(),image->Dataset().experiment.GetYPixelsNum());
float res4 = geom.PxlToRes(0,image->Dataset().experiment.GetYPixelsNum());
float min_res = std::min({res1, res2, res3, res4});
for (const auto &d: res_ring) {
if (d < min_res)
continue;
auto [x1,y1] = geom.ResPhiToPxl(d, 0);
auto [x2,y2] = geom.ResPhiToPxl(d, M_PI_2);
auto [x3,y3] = geom.ResPhiToPxl(d, M_PI);