SpotToSave gains int16_t panel (-1 = no panel table). It sits in the padding after the two bools, so sizeof(SpotToSave) stays 80. It is serialised only where it is set: CBOR spot key "panel", HDF5 /entry/MX/peakPanel (data file, plus a virtual dataset in a VDS master when the start message has panels), read back by HDF5MetadataSource. For a flat detector none of these is written, so files and streams for existing data are byte-for-byte unchanged. The start message carries the panel table (detector_modules, CBOR key absent when empty), filled from the experiment; JFJochHttpReader takes it, so a stream viewer knows the panels too. AssignModules takes the spot's panel id where it has one - the stored pixel box it was found in - and falls back to the plane position otherwise (every spot until per-panel spot finding sets the id). Reflection deliberately gets no panel id (owner decision): it is needed only between prediction and integration, and the struct feeds GPU layout and memory budgets. Tests: CBORSerialize_SpotPanelId, CBORSerialize_StartDetectorModules, JFJochReader_PanelId (VDS/legacy/integrated, with and without panels). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu
25 lines
684 B
C
25 lines
684 B
C
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include "DiffractionGeometry.h"
|
|
|
|
struct SpotToSave {
|
|
float x = 0;
|
|
float y = 0;
|
|
float phi = 0;
|
|
float intensity = 0;
|
|
int64_t maxc = 0;
|
|
int64_t lattice = -1; // -1 non indexed
|
|
int64_t image = 0;
|
|
int64_t h = 0, k = 0, l= 0;
|
|
float d_A = 0.0;
|
|
float dist_ewald_sphere = 0.0;
|
|
bool ice_ring = false;
|
|
bool indexed = false;
|
|
int16_t panel = -1; // index into the experiment's DetectorModules; -1 = no panel table
|
|
|
|
Coord ReciprocalCoord(const DiffractionGeometry &experiment) const;
|
|
};
|