// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include #include class ResolutionShells { const float d_min, d_max; const float one_over_dmin2, one_over_dmax2; const int32_t nshells; public: // Shells of equal width in 1/d^2 between d_min (exclusive) and d_max (inclusive). d_max may be // infinite, which is "no low-resolution bound": the shells then start at 1/d^2 = 0. ResolutionShells(float d_min, float d_max, int32_t nshells); [[nodiscard]] std::optional GetShell(float d) const; [[nodiscard]] std::vector GetShellMeanOneOverResSq() const; [[nodiscard]] std::vector GetShellMinRes() const; };