jfjoch_process: More fixes
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 7m48s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 9m24s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 9m56s
Build Packages / Generate python client (push) Successful in 29s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m17s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 57s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 14m34s
Build Packages / build:rpm (rocky8) (push) Successful in 14m42s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 14m58s
Build Packages / build:rpm (rocky9) (push) Successful in 15m7s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m56s
Build Packages / Unit tests (push) Successful in 53m37s

This commit is contained in:
2026-02-11 19:59:32 +01:00
parent 161df2f5a1
commit 34b24133c7
+8 -4
View File
@@ -331,6 +331,8 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector<Reflection>& ob
const bool refine_partiality = opt.wedge_deg > 0.0;
std::vector<bool> is_valid_hkl_slot(nhkl, false);
for (const auto& o : obs) {
size_t mos_slot = opt.per_image_mosaicity ? o.img_slot : 0;
@@ -347,6 +349,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector<Reflection>& ob
&g[o.img_slot],
&mosaicity[mos_slot],
&Itrue[o.hkl_slot]);
is_valid_hkl_slot[o.hkl_slot] = true;
} else {
auto* cost = new ceres::AutoDiffCostFunction<IntensityResidual, 1, 1, 1, 1>(
new IntensityResidual(*o.r, o.sigma, opt.wedge_deg, refine_partiality));
@@ -356,6 +359,7 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector<Reflection>& ob
&g[o.img_slot],
&mosaicity[mos_slot],
&Itrue[o.hkl_slot]);
is_valid_hkl_slot[o.hkl_slot] = true;
}
}
@@ -363,12 +367,12 @@ ScaleMergeResult ScaleAndMergeReflectionsCeres(const std::vector<Reflection>& ob
if (opt.log_scaling_residual) {
for (int i = 0; i < nimg; ++i)
problem.SetParameterLowerBound(&g[i], 0, 1e-12);
for (int h = 0; h < nhkl; ++h)
problem.SetParameterLowerBound(&Itrue[h], 0, 1e-12);
for (int h = 0; h < nhkl; ++h) {
if (is_valid_hkl_slot[h])
problem.SetParameterLowerBound(&Itrue[h], 0, 1e-12);
}
}
// Optional Kabsch-like regularization for k
// Mosaicity refinement + bounds
if (!opt.refine_mosaicity) {
for (int i = 0; i < nimg; ++i)