// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include #include #include "../../common/UnitCell.h" #include "AssignSpotsToRings.h" // ReflectionCondition // The powder standards the detector geometry can be calibrated against, shared by // rugnux --mode=calibration and the viewer's powder-calibration panel. struct Calibrant { std::string name; // as offered on the command line and in the GUI (matched case-insensitively) std::optional cell; // unset for ice - see CalibrantRings() // The cell alone does not give the rings: a centred lattice extinguishes some of them, and the // innermost ring the fit starts from is the first one that is NOT extinguished. ReflectionCondition condition = ReflectionCondition::All; }; const std::vector &Calibrants(); // The rings a calibrant produces, as q = 2*pi/d in 1/A - the unit CalculateXtalRings returns and // RingOptimizerInput::q_expected expects - sorted ascending. Empty if the name is not a calibrant. // // A ring LIST rather than a UnitCell because ice cannot be given as one: hexagonal ice is P6_3/mmc, so // enumerating hkl from its cell would emit rings that are systematically absent, while the eleven // entries of ICE_RING_RES_A are measured ring positions. std::vector CalibrantRings(const std::string &name); // "lab6, agbh, ceo2, si, ice" - for the error message when a name is not one of them. std::string CalibrantNameList();