Files
Jungfraujoch/common/ResolutionShells.h
2025-10-20 20:43:44 +02:00

23 lines
707 B
C++

// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JFJOCH_RESOLUTIONSHELLS_H
#define JFJOCH_RESOLUTIONSHELLS_H
#include <optional>
#include <cstdint>
#include <vector>
class ResolutionShells {
const float d_min, d_max;
const float one_over_dmin2, one_over_dmax2;
const int32_t nshells;
public:
ResolutionShells(float d_min, float d_max, int32_t nshells);
[[nodiscard]] std::optional<int32_t> GetShell(float d) const;
[[nodiscard]] std::vector<float> GetShellMeanOneOverResSq() const;
[[nodiscard]] std::vector<float> GetShellMinRes() const;
};
#endif //JFJOCH_RESOLUTIONSHELLS_H