// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #include "UpdateReflectionResolution.h" #include "../common/CrystalLattice.h" void UpdateReflectionResolution(const UnitCell &cell, std::vector > &reflections) { CrystalLattice latt(cell); const auto astar = latt.Astar(); const auto bstar = latt.Bstar(); const auto cstar = latt.Cstar(); for (auto &image: reflections) { for (auto &r: image) { Coord q = r.h * astar + r.k * bstar + r.l * cstar; auto qlen = q.Length(); if (qlen > 1e-6) r.d = 1/qlen; else r.d = NAN; } } }