// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include #include #include #include "UnitCell.h" // What an MTZ file holds - its header, its columns and its batch headers - with no file behind it: the // merged reflections, the map coefficients and the unmerged observations rugnux makes, for whatever // writes them (WriteMtz, writer/WriteRugnuxFiles.h) or carries them (the END message). Every dataset // has the table's cell; a dataset's id is its position in `datasets`. struct MtzTable { struct Dataset { std::string project_name; std::string crystal_name; std::string dataset_name; float wavelength_A = 0.0f; // 0 = not set }; struct Column { std::string label; char type = 'R'; // the MTZ column type: H, J, Q, F, I, ... int32_t dataset_id = 0; std::vector values; // one per row }; // The header of one image of unmerged data: the integer and real arrays as the MTZ format lays them // out (29 and 156 long), and the names of its goniostat axes. struct Batch { int32_t number = 0; std::string title; std::vector ints; std::vector floats; std::vector axes; }; std::string title; UnitCell unit_cell{}; std::string space_group_name; // extended Hermann-Mauguin (xhm), which keeps the setting std::vector history; std::array sort_order{}; std::vector datasets; std::vector columns; std::vector batches; };