Files
Jungfraujoch/common/IndexingSettings.h
T
leonarski_f fc68a9baed
Build Packages / Unit tests (push) Skipped
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m34s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 10m0s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m23s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m23s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 11m16s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 11m49s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m32s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m15s
Build Packages / XDS test (durin plugin) (push) Successful in 7m16s
Build Packages / Generate python client (push) Successful in 16s
Build Packages / build:rpm (rocky9) (push) Successful in 10m12s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Successful in 47s
Build Packages / DIALS test (push) Successful in 10m18s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 5m46s
Build Packages / build:rpm (rocky8) (push) Successful in 1h41m2s
Build Packages / XDS test (neggia plugin) (push) Successful in 1h59m18s
v1.0.0-rc.146 (#56)
This is an UNSTABLE release. The release has significant modifications for data processing - in case of troubles go back to 1.0.0-rc.144.

jfjoch_process: Generate a dedicated file (_process.h5), which can be used as a replacement for the _master.h5 file for a reanalyzed dataset.
jfjoch_process: Improve the performance of scaling and merging, implement on the fly scaling.
jfjoch_writer: All final data analysis results are repopulated in the _master.h5 file.
jfjoch_scale: Dedicated tool for rescaling/merging existing data.
jfjoch_viewer: Fix bugs where pixel labels where displayed on a wrong pixel.

WARNING! Scaling and merging are experimental at the moment, and may not provide reasonable results for the time being.

Reviewed-on: #56
2026-05-28 18:48:35 +02:00

78 lines
3.3 KiB
C++

// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JFJOCH_INDEXINGSETTINGS_H
#define JFJOCH_INDEXINGSETTINGS_H
#include <cstdint>
enum class IndexingAlgorithmEnum {FFBIDX, FFT, FFTW, Auto, None};
enum class GeomRefinementAlgorithmEnum {None, OrientationOnly, BeamCenter};
class IndexingSettings {
IndexingAlgorithmEnum algorithm;
int64_t fft_num_vectors = 16*1024;
float fft_max_unit_cell_A = 500.0;
float fft_min_unit_cell_A = 10.0;
float fft_max_angle_deg = 150.0;
float fft_min_angle_deg = 30.0;
float fft_high_resolution_A = 2.0;
float indexing_tolerance = 0.1;
float max_angle_from_ewald_deg = 2.0;
float unit_cell_dist_tolerance_vs_reference = 0.05; // relative
static constexpr float unit_cell_angle_tolerance_deg = 5.0; // degree
int64_t indexing_threads = 4;
int64_t viable_cell_min_spots = 9;
bool blocking_behavior = true;
bool index_ice_rings = false;
bool enable_rotation_indexing = false;
float rotation_indexing_min_angular_range_deg = 20.0;
float rotation_indexing_angular_stride_deg = 0.5;
GeomRefinementAlgorithmEnum refinement = GeomRefinementAlgorithmEnum::BeamCenter;
public:
IndexingSettings();
IndexingSettings& ViableCellMinSpots(int64_t input);
IndexingSettings& Algorithm(IndexingAlgorithmEnum input);
IndexingSettings& FFT_MaxUnitCell_A(float input);
IndexingSettings& FFT_MinUnitCell_A(float input);
IndexingSettings& FFT_MaxAngle_deg(float input);
IndexingSettings& FFT_MinAngle_deg(float input);
IndexingSettings& FFT_NumVectors(int64_t input);
IndexingSettings& FFT_HighResolution_A(float input);
IndexingSettings& Tolerance(float input);
IndexingSettings& IndexingThreads(int64_t input);
IndexingSettings& UnitCellDistTolerance(float input);
IndexingSettings& GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum input);
IndexingSettings& IndexIceRings(bool input);
IndexingSettings& RotationIndexing(bool input);
IndexingSettings& RotationIndexingMinAngularRange_deg(float input);
IndexingSettings& RotationIndexingAngularStride_deg(float input);
IndexingSettings& BlockingBehavior(bool input);
[[nodiscard]] int64_t GetViableCellMinSpots() const;
[[nodiscard]] IndexingAlgorithmEnum GetAlgorithm() const;
[[nodiscard]] GeomRefinementAlgorithmEnum GetGeomRefinementAlgorithm() const;
[[nodiscard]] float GetFFT_MaxUnitCell_A() const;
[[nodiscard]] float GetFFT_MinUnitCell_A() const;
[[nodiscard]] int64_t GetFFT_NumVectors() const;
[[nodiscard]] float GetFFT_HighResolution_A() const;
[[nodiscard]] float GetTolerance() const;
[[nodiscard]] float GetFFT_MinAngle_deg() const;
[[nodiscard]] float GetFFT_MaxAngle_deg() const;
[[nodiscard]] int64_t GetIndexingThreads() const;
[[nodiscard]] float GetUnitCellDistTolerance() const;
[[nodiscard]] float GetUnitCellAngleTolerance_deg() const;
[[nodiscard]] bool GetIndexIceRings() const;
[[nodiscard]] bool GetRotationIndexing() const;
[[nodiscard]] float GetRotationIndexingMinAngularRange_deg() const;
[[nodiscard]] float GetRotationIndexingAngularStride_deg() const;
[[nodiscard]] bool GetBlockingBehavior() const;
};
#endif //JFJOCH_INDEXINGSETTINGS_H