viewer: expose stills processing settings; rename geom refinement multi -> flex

Wire the recently-added stills knobs into jfjoch_viewer - they were reachable
only from the rugnux CLI, and the viewer had silently diverged from the CLI once
--refine-geometry became default-on for stills-with-cell.

- Stills geometry-refinement two-pass (--refine-geometry): a checkbox + frame
  count in the reprocessing-job dialog, offered (and defaulted on, matching the
  CLI) only for a stills-with-cell run; wired into ProcessConfig and the
  "Copy command" generator (joined =N, or =off to reproduce opting out of the
  CLI default-on).
- Stills partiality (--still-partiality) checkbox in Bragg integration and the
  partiality-uncertainty merge term (--partiality-uncertainty) in Scaling, both
  mirrored in the command-line generator.

Rename the "best per-image refinement" mode from "multi" to "flex" everywhere:
GeomRefinementAlgorithmEnum::Flex, CLI -r flex (with "multi" kept as a hidden
back-compat alias), OpenAPI enum "Flex" + regenerated C++/TS clients, viewer
combo, frontend dropdown, and the stored HDF5 string. "multi" collides with
CrystFEL's multi-lattice sense; "flex" = let the pipeline decide. The API now
carries a dedicated Flex value instead of masquerading as BeamCenter.

Also fix a pre-existing bug in Convert(IndexingSettings): OrientationOnly was
missing from the outbound switch and serialized as an invalid API value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-15 11:28:09 +02:00
co-authored by Claude Opus 4.8
parent 4bdf9309dd
commit 5d1ddccee8
15 changed files with 124 additions and 19 deletions
@@ -81,6 +81,9 @@ void to_json(nlohmann::json& j, const Geom_refinement_algorithm& o)
case Geom_refinement_algorithm::eGeom_refinement_algorithm::ORIENTATIONONLY:
j = "OrientationOnly";
break;
case Geom_refinement_algorithm::eGeom_refinement_algorithm::FLEX:
j = "Flex";
break;
case Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE:
j = "None";
break;
@@ -97,6 +100,9 @@ void from_json(const nlohmann::json& j, Geom_refinement_algorithm& o)
else if (s == "OrientationOnly") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::ORIENTATIONONLY);
}
else if (s == "Flex") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::FLEX);
}
else if (s == "None") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE);
} else {