diff --git a/common/BraggIntegrationSettings.h b/common/BraggIntegrationSettings.h index fcc6e45a..36b31b9f 100644 --- a/common/BraggIntegrationSettings.h +++ b/common/BraggIntegrationSettings.h @@ -24,8 +24,9 @@ class BraggIntegrationSettings { // Symmetric trimmed-mean fraction for the r2..r3 background ring: drop the lowest and highest this // fraction of ring pixels before averaging. Resists the high-side contamination (neighbour-spot // wings, tails, zingers) that biases the plain ring mean up and makes it over-subtract weak - // high-angle reflections. Applied to monochromatic (rotation) data; the integration engine keeps - // the tuned high-side sigma-clip for stills instead. 0 = plain ring mean (rugnux --background-trim). + // high-angle reflections. Applied to monochromatic data (rotation and still); the integration engine + // keeps the tuned high-side sigma-clip for broadband (non-zero bandwidth) data instead. 0 = plain ring + // mean (rugnux --background-trim). float bkg_trim_fraction = 0.10f; public: diff --git a/image_analysis/bragg_integration/BraggIntegrationEngine.cpp b/image_analysis/bragg_integration/BraggIntegrationEngine.cpp index 6573ef56..f89337bb 100644 --- a/image_analysis/bragg_integration/BraggIntegrationEngine.cpp +++ b/image_analysis/bragg_integration/BraggIntegrationEngine.cpp @@ -68,8 +68,9 @@ BraggIntegrationEngine::BraggIntegrationEngine(const DiffractionExperiment &expe beam_y = geom.GetBeamY_pxl(); use_ellipse = !empirical && (bw_sigma > 0.0 || c_radial > 0.0); - // Trimmed-mean background applies to monochromatic (rotation) data; broadband (stills) keep the tuned - // high-side sigma-clip, so the trim is forced off there. The fraction itself comes from the settings. + // Trimmed-mean background applies to monochromatic data - both rotation AND stills (the discriminator + // is the beam, not the acquisition mode). Broadband (non-zero bandwidth: pink-beam / DMM) data keep the + // tuned high-side sigma-clip instead, so the trim is forced off there. The fraction comes from settings. bkg_trim = broadband ? 0.0f : settings.GetBackgroundTrimFraction(); polarization = experiment.GetPolarizationFactor(); diff --git a/rugnux/rugnux_cli.cpp b/rugnux/rugnux_cli.cpp index 99430b3e..795265de 100644 --- a/rugnux/rugnux_cli.cpp +++ b/rugnux/rugnux_cli.cpp @@ -112,7 +112,7 @@ void print_usage() { std::cout << " Integration" << std::endl; std::cout << " --bandwidth Relative X-ray bandwidth FWHM (e.g. 0.01 for 1% DMM); default from file or 0" << std::endl; std::cout << " --integration-radius Signal-box radius r1, or r1,r2,r3 (px). One value => r2=r1+2, r3=r1+4" << std::endl; - std::cout << " --background-trim Rotation: symmetric trimmed-mean fraction for the background ring (0<=f<0.5, default 0.10; 0 = plain mean). Removes the high-side bias that over-subtracts weak high-angle spots" << std::endl; + std::cout << " --background-trim Monochromatic (rotation + still): symmetric trimmed-mean fraction for the background ring (0<=f<0.5, default 0.10; 0 = plain mean). Removes the high-side bias that over-subtracts weak high-angle spots (broadband data keep the sigma-clip instead)" << std::endl; std::cout << " --integrator Spot integrator boxsum|gaussian|empirical (default: gaussian profile-fit; boxsum is the classical fallback)" << std::endl; std::cout << " --still-partiality Experimental: weight stills reflections by a Gaussian excitation-error partiality exp(-dist_ewald^2/2sigma^2) instead of treating each as a full" << std::endl; std::cout << " -q, --azim-q-spacing Azimuthal-integration Q bin spacing (1/A) (default: 0.01)" << std::endl;