Files
Jungfraujoch/image_analysis/indexing/FitProfileRadius.h
T
leonarski_fandClaude Opus 4.8 7b464e4b3c indexing: deconvolve energy bandwidth from the profile radius
The profile radius (intrinsic excitation-error width = mosaicity + divergence)
was the plain RMS of dist_ewald over indexed spots. With a finite energy
bandwidth that spread is broadened by the bandwidth's radial smear
sigma_bw = bandwidth_sigma*lambda/(2 d^2), which prediction then re-applies per
reflection - so bandwidth was counted twice and the radius was inflated (most at
high resolution, sigma_bw ~ 1/d^2). Subtract the bandwidth variance from the
measured spread so the radius is the intrinsic width. bandwidth = 0
(monochromatic / rotation) is unchanged. Small for narrow bandwidths (~6% of the
variance, ~4% radius on the 1% jet); matters for wide-bandwidth / pink beam.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 10:56:49 +02:00

20 lines
875 B
C++

// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#include <optional>
#include <vector>
#include "../../common/SpotToSave.h"
std::optional<float> FitProfileRadius_MAD(const std::vector<SpotToSave>& spots);
// Intrinsic excitation-error (mosaicity+divergence) width from the indexed-spot spread. When a finite
// energy bandwidth is given, its radial smear (bandwidth_sigma*lambda/(2 d^2)) is deconvolved out, so
// the result is the intrinsic width and bandwidth is not double-counted by prediction (which re-adds
// it). bandwidth_sigma = 0 reproduces the plain RMS (monochromatic / rotation).
std::optional<float> FitProfileRadius(const std::vector<SpotToSave>& spots,
float bandwidth_sigma = 0.0f, float wavelength_A = 0.0f);