// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #pragma once #include #include #include #include #include "../common/DiffractionGeometry.h" #include "../common/DiffractionExperiment.h" #include "../common/PixelMask.h" #include "../common/AzimuthalIntegrationMapping.h" struct JFJochReaderDataset { std::string arm_date; DiffractionExperiment experiment; PixelMask pixel_mask; std::optional error_value; std::string jfjoch_release; std::vector az_int_bin_to_q; std::vector az_int_bin_to_phi; size_t azimuthal_bins = 0; size_t q_bins = 0; std::vector spot_count; std::vector spot_count_indexed; std::vector spot_count_low_res; std::vector spot_count_ice_rings; std::vector indexing_result; std::vector indexing_lattice_count; std::vector bkg_estimate; std::vector resolution_estimate; std::vector efficiency; std::vector profile_radius; std::vector mosaicity_deg; std::vector b_factor; std::vector integrated_reflections; std::vector image_scale_factor; std::vector image_scale_cc; std::vector image_scale_b; std::vector max_value; // Maps this dataset's image index -> the original/collected image number it came from. // Empty means identity (image i == original image i). Lets a dataset be a subset (or strided // selection) of the truly collected images: reprocessing snapshots over a sub-range, and (in // future) a main dataset that was filtered on-the-fly during collection. std::vector source_image_number; std::vector roi; std::vector> roi_sum; std::vector> roi_sum_sq; std::vector> roi_max; std::vector> roi_npixel; std::vector> roi_x; std::vector> roi_y; // ROI definitions stored in the master file. The logical definitions populate // experiment.ROI() (they re-derive with the current geometry); roi_map is the // per-pixel bitmask as written (constant footprint), with roi_bit_index mapping // each ROI name to its bit. std::vector roi_map; std::map roi_bit_index; std::vector calibration_data; JFJochReaderDataset() = default; JFJochReaderDataset(const JFJochReaderDataset &other) = default; };