// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #ifndef JUNGFRAUJOCH_AZIMUTHALINTEGRATIONMAPPING_H #define JUNGFRAUJOCH_AZIMUTHALINTEGRATIONMAPPING_H #include #include "DiffractionExperiment.h" #include "PixelMask.h" class AzimuthalIntegration { protected: const AzimuthalIntegrationSettings settings; const float wavelength; const size_t width, height; std::vector bin_to_q; std::vector bin_to_2theta; std::vector bin_to_d; std::vector bin_to_phi; std::vector pixel_to_bin; std::vector pixel_resolution; std::vector corrections; std::optional polarization_correction; void UpdateMaxBinNumber(); AzimuthalIntegration(const AzimuthalIntegrationSettings& settings, size_t width, size_t height, float wavelength); void SetupRawGeom(const DiffractionExperiment& experiment, const std::vector &mask); void SetupConvGeom(const DiffractionGeometry &geom, const std::vector &mask); void SetupPixel(const DiffractionGeometry &geom, const std::vector &mask, uint32_t pxl, uint32_t col, uint32_t row); public: AzimuthalIntegration(const DiffractionExperiment& experiment, const PixelMask& mask); [[nodiscard]] uint16_t GetBinNumber() const; [[nodiscard]] const std::vector&GetPixelToBin() const; [[nodiscard]] const std::vector &GetBinToQ() const; [[nodiscard]] const std::vector &GetBinToD() const; [[nodiscard]] const std::vector &GetBinToTwoTheta() const; [[nodiscard]] const std::vector &GetBinToPhi() const; [[nodiscard]] uint16_t QToBin(float q) const; [[nodiscard]] const std::vector &Corrections() const; [[nodiscard]] const std::vector &Resolution() const; [[nodiscard]] size_t GetWidth() const; [[nodiscard]] size_t GetHeight() const; [[nodiscard]] const AzimuthalIntegrationSettings& Settings() const; [[nodiscard]] int32_t GetAzimuthalBinCount() const; [[nodiscard]] int32_t GetQBinCount() const; }; #endif //JUNGFRAUJOCH_AZIMUTHALINTEGRATIONMAPPING_H