Ecdc-3593 support several values in ev44 reference time
Issue
ECDC-3593
If an ev44 packet contains several pulses (nx/event_time_zero ev44/reference_time) and indexes to the right ToF (nx/event_index ev44/reference_time_index), the resulting NeXus event_index must take into account the relative offsets within the single ev44 message.
Instead, it seems we are assuming that ev44/reference_time_index will always be [0] when computing event_index. Then we write the ev44 offset in the non-standard nexus field event_time_zero_index.
Description of work
- Remove non-standard NeXus dataset
event_time_zero_index
. It is unclear to me why we created this in the first place. - Fix
event_index
dataset. We used to store, for each flatbuffer message, the total number of events processed so far. This would effectively store the right index for the corresponding pulse if a single pulse is present in each message. Messages with multiple pulses were not supported. We now store as many items inevent_index
as pulses are received in the FB message, but still shifting their values by the total number of events processed previously. - Fix
cue_timestamp_zero
to use as base timestamp the last pulse in the message, not the first (when is time to add a cue, we add an index to the last message of the flatbuffer, and this message will be using the last pulse not the first one) - Added tests for cue functionality
Checklist
-
Changes have been documented in changes.md
-
Documentation has been updated in documentation
directory
Edited by George ONeill