--polarization was applied with the other geometry overrides, but configure_offline_output runs afterwards and calls ApplyRugnuxExperimentDefaults, which sets the polarization factor unconditionally. Every full-analysis run used 0.99 whatever was asked for, so the Lp correction was wrong at a beamline with different polarization. Apply it after the defaults instead, and stop claiming in RugnuxDefaults.h that nothing here is user-selectable. --scale built a bare ScalingSettings and re-derived the rotation/stills split by hand rather than calling RugnuxDefaultScalingSettings, which is what the split was factored out for. It got scale-fulls, smooth-G, min-captured-fraction and outlier rejection right and dropped CaptureUncertaintyCoeff on the floor: 1.0 in the pipeline, 0.0 here. So re-scaling a rotation _process.h5 gave different sigmas and ISa than the run that wrote it - the exact failure the block's own comment says it exists to prevent. Start from the shared defaults and apply the overrides on top, which also picks up --mosaicity and --search-min-zeta, and let -C bind here too. REJECT_OUTLIERS_DEFAULT_NSIGMA had no reader left afterwards. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
34 lines
2.1 KiB
C
34 lines
2.1 KiB
C
// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include "../common/DiffractionExperiment.h"
|
|
#include "../common/ScalingSettings.h"
|
|
|
|
// What "process this dataset with nothing set" means, in one place.
|
|
//
|
|
// The rugnux CLI and the viewer's "Analyze dataset" are two front ends onto the same Rugnux library,
|
|
// and they are meant to give the same answer on the same data. They used to decide these defaults
|
|
// separately, and the two lists drifted: the viewer had lost the polarization factor, five rotation
|
|
// scaling defaults, and - worst - the step that forgets the crystal the input file happens to carry,
|
|
// which silently skipped the whole de-novo space-group search and reported back whatever group was
|
|
// stored (P1, on a file written by an earlier P1 run). Both front ends now start here and then apply
|
|
// their own explicit overrides on top.
|
|
|
|
// Analysis policy. Output policy (file names, formats, compression) belongs to the caller - the CLI
|
|
// and the viewer write different things in different places. A front end that exposes one of these as
|
|
// a user option (the CLI's --polarization) applies it AFTER this call, or it is overwritten here.
|
|
void ApplyRugnuxExperimentDefaults(DiffractionExperiment &experiment);
|
|
|
|
// Forget the space group and unit cell stored in the input file, so indexing and the space-group
|
|
// search start de novo. A stored cell otherwise resolves the indexing algorithm to ffbidx and drives
|
|
// it to that lattice, and a stored space group skips the search outright. The CLI calls this and then
|
|
// applies -C / -S (or a reference MTZ) on top; the viewer instead takes the crystal straight from its
|
|
// settings panel, which clears both fields when "Unit cell known" is unticked.
|
|
void ClearStoredCrystal(DiffractionExperiment &experiment);
|
|
|
|
// Scaling/merging defaults for the workflow. Several differ between rotation and stills because the
|
|
// rotation path has a 3D combine and the stills path does not; each is explained at its setter.
|
|
ScalingSettings RugnuxDefaultScalingSettings(bool rotation);
|