// SPDX-FileCopyrightText: 2025 Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include #include "../common/Reflection.h" #include "../common/UnitCell.h" #include "../common/DiffractionExperiment.h" struct MergeStatistics; struct TwinningAnalysisResult; // The error model as it is reported, already formatted. `isa` is the whole-range 1/sqrt(a*b), the // same quantity XDS's ISa denotes, so a file written here is directly comparable with a CORRECT.LP; // `isa_asymptotic` is the strong-reflection tier, which only the rotation path has. `a` and `b` are // in XDS's convention, sigma^2 = a*(sigma0^2 + b*I^2). Empty strings are written as unknown. struct ErrorModelReport { std::string isa; std::string isa_asymptotic; std::string a; std::string b; }; void WriteMmcifReflections(const std::vector &reflections, const UnitCell &unitCell, const DiffractionExperiment &experiment, const MergeStatistics &statistics, const ErrorModelReport &error_model, const TwinningAnalysisResult &twinning, const std::string &filename); void WriteMtzReflections(const std::vector &reflections, const UnitCell &unitCell, const DiffractionExperiment &experiment, const std::string &filename); // SHELX HKLF-4 text file (h k l I sigma(I), Bijvoet mates separate) for SHELXC / ANODE. void WriteShelxHklReflections(const std::vector &reflections, const DiffractionExperiment &experiment, const std::string &filename); void WriteReflections(const std::vector &reflections, const UnitCell &unitCell, const DiffractionExperiment &experiment, const MergeStatistics &statistics, const ErrorModelReport &error_model, const TwinningAnalysisResult &twinning, const std::string &filename);