api: record the beam size at the sample, and write it where NXmx puts it
dataset_settings gains beam_size_x_um and beam_size_y_um, the horizontal and vertical size of the X-ray beam where it meets the sample. They follow the same route total_flux takes - OpenAPI, DatasetSettings, the CBOR start message, the HDF5 master, and back out of a stored file - and nothing consumes them; this is metadata a beamline can state and a downstream program can read. NXmx puts this in the application definition rather than the base class: not NXbeam's extent (rank 2, nP x 2, per scan point, always FWHM of a rectangular aperture) but NXmx's own incident_beam_size, a recommended rank-1 two-element array in the order x, y. Both are live and neither is deprecated, so the choice matters; the MX definition wins in an MX file. Written as one array with a units attribute of "m", like every other length in the master, so the settings hold micrometres and FillMessage converts once. The unit table of ReadLength_m becomes LengthUnitFactor so the array read can share it: a master written elsewhere may state this in millimetres. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFEJG6WBQv8th4UJFNe53N
This commit is contained in:
@@ -702,6 +702,8 @@ void CBORStream2Serializer::SerializeSequenceStart(const StartMessage& message)
|
||||
CBOR_ENC(mapEncoder, "incident_energy", message.incident_energy);
|
||||
CBOR_ENC(mapEncoder, "incident_wavelength", message.incident_wavelength);
|
||||
CBOR_ENC(mapEncoder, "incident_wavelength_spread", message.incident_wavelength_spread);
|
||||
CBOR_ENC(mapEncoder, "beam_size_x", message.beam_size_x);
|
||||
CBOR_ENC(mapEncoder, "beam_size_y", message.beam_size_y);
|
||||
|
||||
CBOR_ENC(mapEncoder, "frame_time", message.frame_time);
|
||||
CBOR_ENC(mapEncoder, "count_time", message.count_time);
|
||||
|
||||
Reference in New Issue
Block a user