rugnux: two-pass refined pass takes the canonical (unsuffixed) output name

In the rotation two-pass geometry post-refine, the second (refined-geometry)
pass is the result users want, so give it the plain <prefix>_* name and keep
the first (header-geometry) pass as <prefix>_01_*. Previously the refined pass
was <prefix>_02_*, leaving no plain <prefix>_* output; a downstream consumer
that expects the canonical name now finds the refined result there.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-18 22:21:07 +02:00
co-authored by Claude Opus 4.8
parent 09e4c1116e
commit fcafc61be6
3 changed files with 11 additions and 11 deletions
+5 -6
View File
@@ -220,9 +220,9 @@ ProcessResult Rugnux::Run(RugnuxObserver *observer) {
// Rotation two-pass geometry post-refinement: the first pass integrates at the header geometry and
// post-refines the detector geometry (distance + beam from the observed spot positions, cell scale + axis
// from phi_obs); the second pass re-indexes and re-integrates with the refined geometry. BOTH passes are
// written out - "<prefix>_01_*" is the first (header-geometry) pass and "<prefix>_02_*" the second (refined
// geometry) - so the two can be compared and the better one kept, and the ice-ring flags / geometry stored
// in each master reflect the geometry that pass actually used.
// written out - the second (refined-geometry) pass is the CANONICAL result and takes the plain "<prefix>_*"
// name, while the first (header-geometry) pass is kept as "<prefix>_01_*" for comparison - so the two can be
// compared and the ice-ring flags / geometry stored in each master reflect the geometry that pass used.
if (config_.mode == ProcessMode::FullAnalysis && config_.rotation_postrefine_geometry
&& experiment_.IsRotationIndexing()) {
Logger logger("Rugnux");
@@ -253,11 +253,10 @@ ProcessResult Rugnux::Run(RugnuxObserver *observer) {
experiment_.SpaceGroupNumber(std::nullopt);
prepass_merge_sg_ = prepass_sg_reindexed_ ? std::nullopt : pass1.space_group_number;
logger.Info("Rotation two-pass geometry post-refinement: second pass (refined geometry) -> {}_02_*",
logger.Info("Rotation two-pass geometry post-refinement: second pass (refined geometry, canonical) -> {}_*",
base_prefix);
config_.output_prefix = base_prefix + "_02";
config_.output_prefix = base_prefix; // the refined pass is the canonical result (no _02 suffix)
auto pass2 = RunPipeline(observer, /*write_output=*/true, /*geometry_prepass=*/false);
config_.output_prefix = base_prefix;
return pass2;
}
return RunPipeline(observer, /*write_output=*/true, /*geometry_prepass=*/false);
+1 -1
View File
@@ -77,7 +77,7 @@ void print_usage() {
std::cout << " --single-pass-rotation[=num] Use online-like single-pass rotation indexing (optional: min angular range deg)" << std::endl;
std::cout << " --redo-rotation-spots Redo spot finding for two-pass rotation indexing" << std::endl;
std::cout << " --force-rotation-lattice <vec> Force rotation indexer with external lattice (in Angstrom) : \"a0x,a0y,a0z,a1x,a1y,a1z,a2x,a2y,a2z\" (9 floats, skips first pass)" << std::endl;
std::cout << " --rotation-no-postrefine Disable the (default-on) two-pass rotation post-refine (post-refine detector distance/beam + cell/axis, then re-integrate; writes both passes _01 header geometry, _02 refined)" << std::endl;
std::cout << " --rotation-no-postrefine Disable the (default-on) two-pass rotation post-refine (post-refine detector distance/beam + cell/axis, then re-integrate; the refined pass is the canonical <prefix>_* output, the header-geometry pass is kept as <prefix>_01_*)" << std::endl;
std::cout << " -X, --indexing-algorithm <txt> Indexing algorithm (FFBIDX|FFT|FFTW|Auto|None)" << std::endl;
std::cout << " -S, --space-group <num|symbol> Space group number (92) or symbol (P43212) - for indexing and scaling" << std::endl;
std::cout << " -C, --unit-cell <cell> Fix reference unit cell: \"a,b,c,alpha,beta,gamma\"" << std::endl;
@@ -211,16 +211,17 @@ int JFJochProcessingJobsWindow::askJob(const ReprocessingInputs &inputs, JobSpec
refineRowLayout->addStretch();
// Rotation two-pass geometry post-refine: a first pass post-refines the detector distance / beam /
// cell + rotation axis from the whole sweep, then re-integrates at that geometry (writing both passes,
// _01 header geometry and _02 refined). Rotation-only; default on there, to match the rugnux CLI.
// cell + rotation axis from the whole sweep, then re-integrates at that geometry (the refined pass is the
// canonical <prefix>_* output, the header-geometry pass is kept as <prefix>_01_*). Rotation-only;
// default on there, to match the rugnux CLI.
const bool rotation_run = !azint && inputs.experiment.GetIndexingSettings().GetRotationIndexing();
auto *postrefine = new QCheckBox("Post-refine geometry (rotation, two-pass)", &dlg);
postrefine->setChecked(rotation_run);
postrefine->setEnabled(rotation_run);
postrefine->setToolTip(
"Rotation only: a first pass post-refines the detector distance / beam centre / cell / rotation "
"axis from the whole sweep, then re-integrates at the refined geometry. Writes both passes "
"(_01 header geometry, _02 refined). Default on; a no-op for stills.");
"axis from the whole sweep, then re-integrates at the refined geometry. The refined pass is the "
"canonical <prefix> output; the header-geometry pass is kept as <prefix>_01. Default on; a no-op for stills.");
auto *form = new QFormLayout;
form->addRow("Start image", start_image);