d760b12a18
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 9m32s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m19s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 11m49s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 12m37s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m23s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 11m44s
Build Packages / build:rpm (rocky8) (push) Successful in 9m15s
Build Packages / build:rpm (rocky9) (push) Successful in 12m14s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m28s
Build Packages / Generate python client (push) Successful in 21s
Build Packages / XDS test (durin plugin) (push) Successful in 8m58s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 12m7s
Build Packages / Build documentation (push) Successful in 42s
Build Packages / Create release (push) Has been skipped
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m24s
Build Packages / DIALS test (push) Successful in 14m1s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m26s
Build Packages / Unit tests (push) Failing after 1h20m14s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132. * jfjoch_broker: Azimuthal integration mapping is generated with parallel computations, significantly reducing setup times * frontend: Fix selection of FFTW in indexing settings Reviewed-on: #51 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
63 lines
2.4 KiB
C++
63 lines
2.4 KiB
C++
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#ifndef JUNGFRAUJOCH_AZIMUTHALINTEGRATIONMAPPING_H
|
|
#define JUNGFRAUJOCH_AZIMUTHALINTEGRATIONMAPPING_H
|
|
|
|
#include <optional>
|
|
#include "DiffractionExperiment.h"
|
|
#include "PixelMask.h"
|
|
|
|
class AzimuthalIntegrationMapping {
|
|
protected:
|
|
const AzimuthalIntegrationSettings settings;
|
|
const float wavelength;
|
|
const size_t width, height;
|
|
|
|
std::vector<float> bin_to_q;
|
|
std::vector<float> bin_to_2theta;
|
|
std::vector<float> bin_to_d;
|
|
std::vector<float> bin_to_phi;
|
|
std::vector<uint16_t> pixel_to_bin;
|
|
|
|
std::vector<float> pixel_resolution;
|
|
std::vector<float> corrections;
|
|
|
|
std::optional<float> polarization_factor;
|
|
|
|
size_t nthreads;
|
|
|
|
void UpdateMaxBinNumber();
|
|
|
|
void SetupRawGeom(const DiffractionExperiment& experiment, const std::vector<uint32_t> &mask, size_t nthreads);
|
|
void SetupConvGeomRows(const DiffractionGeometry &geom, const std::vector<uint32_t> &mask, size_t row0, size_t row_end);
|
|
void SetupConvGeom(const DiffractionGeometry &geom, const std::vector<uint32_t> &mask, size_t nthreads);
|
|
|
|
void SetupPixel(const DiffractionGeometry &geom, const std::vector<uint32_t> &mask,
|
|
uint32_t pxl, uint32_t col, uint32_t row);
|
|
public:
|
|
|
|
AzimuthalIntegrationMapping(const DiffractionExperiment& experiment,
|
|
const PixelMask& mask,
|
|
size_t nthreads = 0);
|
|
|
|
[[nodiscard]] uint16_t GetBinNumber() const;
|
|
[[nodiscard]] const std::vector<uint16_t>&GetPixelToBin() const;
|
|
[[nodiscard]] const std::vector<float> &GetBinToQ() const;
|
|
[[nodiscard]] const std::vector<float> &GetBinToD() const;
|
|
[[nodiscard]] const std::vector<float> &GetBinToTwoTheta() const;
|
|
[[nodiscard]] const std::vector<float> &GetBinToPhi() const;
|
|
[[nodiscard]] uint16_t QToBin(float q) const;
|
|
[[nodiscard]] const std::vector<float> &Corrections() const;
|
|
[[nodiscard]] const std::vector<float> &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;
|
|
[[nodiscard]] size_t GetNThreads() const;
|
|
};
|
|
|
|
|
|
#endif //JUNGFRAUJOCH_AZIMUTHALINTEGRATIONMAPPING_H
|