From af847239fc69f323f30c320e02afaa5391ee5da5 Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Thu, 28 May 2026 17:13:42 +0200 Subject: [PATCH] OpenAPI: Add orientation only refinement --- broker/OpenAPIConvert.cpp | 3 +++ broker/gen/model/Geom_refinement_algorithm.cpp | 6 ++++++ broker/gen/model/Geom_refinement_algorithm.h | 5 +++-- broker/jfjoch_api.yaml | 6 ++++-- broker/redoc-static.html | 7 ++++--- docs/python_client/docs/GeomRefinementAlgorithm.md | 4 +++- frontend/package-lock.json | 4 ++-- frontend/src/components/IndexingSettings.tsx | 5 +++-- frontend/src/openapi/models/geom_refinement_algorithm.ts | 6 ++++-- 9 files changed, 32 insertions(+), 14 deletions(-) diff --git a/broker/OpenAPIConvert.cpp b/broker/OpenAPIConvert.cpp index db90e0b0..bc671e3d 100644 --- a/broker/OpenAPIConvert.cpp +++ b/broker/OpenAPIConvert.cpp @@ -943,6 +943,9 @@ IndexingSettings Convert(const org::openapitools::server::model::Indexing_settin case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER: ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::BeamCenter); break; + case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::ORIENTATIONONLY: + ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::OrientationOnly); + break; case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE: ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::None); break; diff --git a/broker/gen/model/Geom_refinement_algorithm.cpp b/broker/gen/model/Geom_refinement_algorithm.cpp index 6babd6b0..d142be56 100644 --- a/broker/gen/model/Geom_refinement_algorithm.cpp +++ b/broker/gen/model/Geom_refinement_algorithm.cpp @@ -78,6 +78,9 @@ void to_json(nlohmann::json& j, const Geom_refinement_algorithm& o) case Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER: j = "BeamCenter"; break; + case Geom_refinement_algorithm::eGeom_refinement_algorithm::ORIENTATIONONLY: + j = "OrientationOnly"; + break; case Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE: j = "None"; break; @@ -91,6 +94,9 @@ void from_json(const nlohmann::json& j, Geom_refinement_algorithm& o) if (s == "BeamCenter") { o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER); } + else if (s == "OrientationOnly") { + o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::ORIENTATIONONLY); + } else if (s == "None") { o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE); } else { diff --git a/broker/gen/model/Geom_refinement_algorithm.h b/broker/gen/model/Geom_refinement_algorithm.h index 2ccdc737..e7ff00e8 100644 --- a/broker/gen/model/Geom_refinement_algorithm.h +++ b/broker/gen/model/Geom_refinement_algorithm.h @@ -12,7 +12,7 @@ /* * Geom_refinement_algorithm.h * - * Selection of an post-indexing detector geometry refinement algorithm used by Jungfraujoch. This option is using non-linear least squares optimization to find unit cell and beam center. + * Selection of an post-indexing least-square diffraction geometry refinement algorithm used by Jungfraujoch. BeamCenter - This option is refining both beam center and lattice (restricted to a chosen/detected Bravais lattice). OrientationOnly - This option is refining only orientation of the lattice. */ #ifndef Geom_refinement_algorithm_H_ @@ -25,7 +25,7 @@ namespace org::openapitools::server::model { /// -/// Selection of an post-indexing detector geometry refinement algorithm used by Jungfraujoch. This option is using non-linear least squares optimization to find unit cell and beam center. +/// Selection of an post-indexing least-square diffraction geometry refinement algorithm used by Jungfraujoch. BeamCenter - This option is refining both beam center and lattice (restricted to a chosen/detected Bravais lattice). OrientationOnly - This option is refining only orientation of the lattice. /// class Geom_refinement_algorithm { @@ -39,6 +39,7 @@ public: // enum values INVALID_VALUE_OPENAPI_GENERATED = 0, BEAMCENTER, + ORIENTATIONONLY, NONE }; diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index 54ee312d..4631a42c 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -330,10 +330,12 @@ components: geom_refinement_algorithm: type: string description: | - Selection of an post-indexing detector geometry refinement algorithm used by Jungfraujoch. - This option is using non-linear least squares optimization to find unit cell and beam center. + Selection of an post-indexing least-square diffraction geometry refinement algorithm used by Jungfraujoch. + BeamCenter - This option is refining both beam center and lattice (restricted to a chosen/detected Bravais lattice). + OrientationOnly - This option is refining only orientation of the lattice. enum: - "BeamCenter" + - "OrientationOnly" - "None" dataset_settings: type: object diff --git a/broker/redoc-static.html b/broker/redoc-static.html index 2227bad0..6df2bf02 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -588,8 +588,9 @@ There is also correlation between smallest unit cell and max resolution, which n fft_num_vectors
required
integer <int64> >= 128
Default: 16384

Number of search directions for the FFT algorithm; parameter value affects execution time of FFT.

tolerance
required
number <float> [ 0 .. 0.5 ]

Acceptance tolerance for spots after the indexing run - the larger the number, the more spots will be accepted

thread_count
required
integer <int64> [ 1 .. 64 ]

Thread count for indexing algorithm

-
geom_refinement_algorithm
required
string (geom_refinement_algorithm)
Enum: "BeamCenter" "None"

Selection of an post-indexing detector geometry refinement algorithm used by Jungfraujoch. -This option is using non-linear least squares optimization to find unit cell and beam center.

+
geom_refinement_algorithm
required
string (geom_refinement_algorithm)
Enum: "BeamCenter" "OrientationOnly" "None"

Selection of an post-indexing least-square diffraction geometry refinement algorithm used by Jungfraujoch. +BeamCenter - This option is refining both beam center and lattice (restricted to a chosen/detected Bravais lattice). +OrientationOnly - This option is refining only orientation of the lattice.

unit_cell_dist_tolerance
required
number <float> [ 0.0001 .. 0.2001 ]
Default: 0.05

Relative distance tolerance for unit cell vs. reference; Lattices outside given tolerance will be ignored

viable_cell_min_spots
required
integer <int64> >= 5
Default: 10

Minimum number of indexed spots required for a cell to be considered viable

index_ice_rings
required
boolean
Default: false

Include spots marked as ice rings in the indexing run. @@ -932,7 +933,7 @@ then image might be replaced in the buffer between calling /images and /image.cb