From caff857d8a21e14ae9f9532914d8fd73221d747b Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Tue, 16 Jun 2026 19:11:37 +0200 Subject: [PATCH] docs/CBOR.md: sync field names/types with the serializer Bring the protocol doc in line with CBORStream2Serializer/Deserializer: - reflection dist_ewald -> rp (dist_ewald is the spot field, not the reflection field) - az_int_std -> az_int_profile_std, az_int_count -> az_int_profile_count - threshold_energy typed as Map(string -> float), not float - end_date typed as string (it is serialized as a plain text string, with no datetime tag, unlike arm_date) - add missing reflection fields: phi, zeta, image_scale_corr - add missing spot fields: image, and indexed-only h, k, l, dist_ewald - add image indexing_lattice_count and end indexed_lattice_count - drop the duplicated image_scale_factor row in the End table Co-Authored-By: Claude Opus 4.8 --- docs/CBOR.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/CBOR.md b/docs/CBOR.md index 58339cc6..a82af4bc 100644 --- a/docs/CBOR.md +++ b/docs/CBOR.md @@ -68,7 +68,7 @@ There are minor differences at the moment: | max_extra_lattices | uint64 | Maximum number of extra lattices | | | storage_cell_number | uint64 (optional) | Number of storage cells used by JUNGFRAU | | | storage_cell_delay | Rational | Delay of storage cells in JUNGFRAU | | -| threshold_energy | float | Threshold energy for EIGER detector \[eV\] | | +| threshold_energy | Map(string -> float) | Per-channel threshold energy \[eV\] (map of channel name to value) | | | image_dtype | string | Pixel bit type (e.g. uint16) | X | | unit_cell | object (optional) | Unit cell of the system: a, b, c \[angstrom\] and alpha, beta, gamma \[degree\] | | | az_int_q_bin_count | uint64 | Number of azimuthal integration bins in the radial direction | | @@ -139,6 +139,11 @@ See [DECTRIS documentation](https://github.com/dectris/documentation/tree/main/s | - ice_ring | bool | spot in resolution range for ice rings | | | | - indexed | bool | indexed solution | | | | - latt | int64 | Lattice to which the peak belongs (negative number = not indexed) | | | +| - image | int64 | image number the spot belongs to | | | +| - h | int64 | Miller index (indexed spots only) | | | +| - k | int64 | Miller index (indexed spots only) | | | +| - l | int64 | Miller index (indexed spots only) | | | +| - dist_ewald | float | distance to Ewald sphere \[Angstrom^-1\] (indexed spots only) | | | | reflections | Array(object) | Reflections: | | | | - h | int64 | Miller index | | | | - k | int64 | Miller index | | | @@ -152,18 +157,22 @@ See [DECTRIS documentation](https://github.com/dectris/documentation/tree/main/s | - bkg | float | mean background value (photons) | | | | - sigma | float | standard deviation, estimated from counting statistics (photons) | | | | - image | float | image number (present for each spot) | | | -| - dist_ewald | float | distance to Ewald sphere (present only for indexed spots) | | | +| - rp | float | Distance to Ewald sphere \[Angstrom^-1\] | | | | - rlp | float | Reciprocal Lorentz and polarization corrections | | | | - partiality | float | Partiality of the reflection | | | +| - phi | float | phi angle from XDS: difference from middle of current frame, not absolute \[deg\] | | | +| - zeta | float | Lorentz zeta factor (reciprocal-space geometry term) | | | +| - image_scale_corr | float | Per-image scale correction; I_true = image_scale_corr * I | | | | spot_count | uint64 | Spot count | | | | spot_count_ice_rings | uint64 | Number of spots within identified rings (experimental) | | | | spot_count_low_res | uint64 | Number of spots in low resolution (prior to filtering) | | | | spot_count_indexed | uint64 | Number of spots which fit indexing solution within a given tolerance | | | | az_int_profile | Array(float) | Azimuthal integration results, use az_int_bin_to_q from start message for legend | | | | | | NaN is used for empty bins and has to be taken care by the receiver | | | -| az_int_std | Array(float) | Standard deviation for azimuthal integration. (NaN for less than 2 samples) | | | -| az_int_count | Array(uint64) | Number of pixels contributing to azimuthal bin | | | +| az_int_profile_std | Array(float) | Standard deviation for azimuthal integration. (NaN for less than 2 samples) | | | +| az_int_profile_count | Array(uint64) | Number of pixels contributing to azimuthal bin | | | | indexing_result | bool | Indexing successful | | | +| indexing_lattice_count | int64 | Number of indexing lattices found for this image | | | | indexing_lattice | Array(9 * float) | Indexing result real lattice; present only if indexed | | X | | indexing_extra_lattices | Array(Array(9*float)) | Additional indexed lattices (orientation variants); present only if found | | | | indexing_unit_cell | object | Indexing result unit cell: a, b, c \[angstrom\] and alpha, beta, gamma \[degree\]; present only if indexed | | X | @@ -271,7 +280,7 @@ See [DECTRIS documentation](https://github.com/dectris/documentation/tree/main/s | magic_number | uint64 | Number used to describe version of the Jungfraujoch data interface - to allow to detect inconsistency between sender and receiver | | | series_unique_id | string | Unique text ID of the series (run_name parameter) | X | | series_id | uint64 | Unique numeric ID of the series (run_number parameter) | X | -| end_date | date | Approximate end date | | +| end_date | string | Approximate end date | | | max_image_number | uint64 | Number of image with the highest number; counted from 1 to distinguish zero images and one image | | | images_collected | uint64 | Number of images collected | | | images_sent_to_write | uint64 | Number of images sent to writer; if writer queues were full, it is possible this is less than images collected | | @@ -306,9 +315,9 @@ See [DECTRIS documentation](https://github.com/dectris/documentation/tree/main/s | error_pixel_count | Array(int32) | Per-image error pixel count | | | image_scale_factor | Array(float) | Per-image scale factor, if scaling/merging was performed | | | integrated_reflections | Array(int32) | Per-image count of integrated reflections | | +| indexed_lattice_count | Array(int32) | Per-image count of indexed lattices | | | niggli_class | Array(uint8) | Per-image Niggli class identifier for indexed images; 0 if unavailable | | | pixel_sum | Array(int64) | Per-image sum of all valid pixels, excluding error/saturated pixels | | -| image_scale_factor | Array(float) | Scaling result: Image scale factor (g) | | | image_scale_mosaicity | Array(float) | Scaling result: Image scale mosaicity \[deg\] | | | image_scale_b_factor | Array(float) | Scaling result: Image scale B factor \[Angstrom^2\] | | | image_scale_cc | Array(float) | Scaling result: Image scale CC | |