--mode scale re-measured the rocking width on the stored reflections, so on any file whose frames were predicted through the run's curve it merged with a different curve than the mx run did. The curve the post-refinement used (formula, table, radial scale) is now carried in the EndMessage (StillsRunWidth) and written to the master: /entry/MX/stillsRockingWidthFormula [gamma0 1/A, gamma_e rad, bandwidth sigma], /entry/MX/stillsRadialScale, /entry/MX/stillsRockingWidthTableDstar and /entry/MX/stillsRockingWidthTable (1/A). The reader returns it, and --mode scale passes it to the post-refinement. A file without it is re-measured as before. MeasureRunWidth grouped each frame's reflections by the frame's window, taken as the largest excitation error it predicted. With a window that follows sigma(d*) that is the high-resolution window, applied to the frame's low-resolution reflections too. Given the curve the frames were predicted through, the window is now that curve at the reflection's own resolution; without one, the frame's largest excitation error as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu (cherry picked from commit 992343d0206489991880bb927efc79131134a1d9)
19 lines
919 B
C++
19 lines
919 B
C++
// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
// A stills run's rocking curve as measured by StillsPartialityRefine::MeasureRunWidth (see there): the
|
|
// three-term width formula sigma^2 = gamma0^2 + (gamma_e d*)^2 + (bandwidth_sigma |q_z|)^2 (1/A, rad,
|
|
// relative), the width measured in shells of d* (table_s at the shells' mean d*, 1/A; empty when too few
|
|
// shells could be measured), and the radial scale of the reciprocal lattice the curve is centred on.
|
|
// Carried in the EndMessage so the _process.h5 holds the curve its frames were predicted through and
|
|
// --mode scale merges with it rather than measuring another.
|
|
struct StillsRunWidth {
|
|
double gamma0 = 0.0, gamma_e = 0.0, bandwidth_sigma = 0.0;
|
|
double radial_scale = 1.0;
|
|
std::vector<double> table_dstar, table_s;
|
|
};
|