diff --git a/common/AzimuthalIntegrationSettings.cpp b/common/AzimuthalIntegrationSettings.cpp index de5504c9..54f23bf5 100644 --- a/common/AzimuthalIntegrationSettings.cpp +++ b/common/AzimuthalIntegrationSettings.cpp @@ -23,6 +23,10 @@ AzimuthalIntegrationSettings &AzimuthalIntegrationSettings::SolidAngleCorrection AzimuthalIntegrationSettings &AzimuthalIntegrationSettings::QRange_recipA(float low, std::optional high) { check_finite("Low Q for azimuthal integration", low); check_min("Low Q for azimuthal integration", low, minQ_recipA); + // The low limit has to leave room for at least one bin below maxQ. This used to follow from the + // high limit being mandatory (high <= maxQ and high > low); once "unset" became legal, ResolveHighQ + // was left computing std::clamp(q, low + spacing, maxQ) with the lower bound above the upper one. + check_max("Low Q for azimuthal integration", low, maxQ_recipA - q_spacing); if (high.has_value()) { check_finite("High Q for azimuthal integration", *high); check_max("High Q for azimuthal integration", *high, maxQ_recipA);