Draft
Conversation
The ev44 FlatBuffers schema supports packing events from multiple neutron pulses into a single message via reference_time (array of pulse timestamps) and reference_time_index (array of starting indices). Previously, _require_single_pulse() raised NotImplementedError for multi-pulse messages. Implement 1:N message expansion at the adapter layer: a multi-pulse ev44 message is split into N single-pulse Message objects, each with its per-pulse reference_time[i] as timestamp and sliced event arrays. Downstream code (accumulator, workflows) is unchanged. Key property: zero overhead for single-pulse messages — the loop iterates once, slicing [0:] which is a numpy view (no copy). Changes: - MonitorEvents.from_ev44() and DetectorEvents.from_ev44() now return list[tuple[int | None, Events]] with per-pulse slicing - Ev44ToMonitorEventsAdapter, Ev44ToDetectorEventsAdapter, and KafkaToMonitorEventsAdapter return list[Message[...]] - AdaptingMessageSource.get_messages() flattens list results - Remove _require_single_pulse() function Prompt: Implement the following plan: Support multi-pulse ev44 messages (#708)
This was referenced Feb 26, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #708
reference_timeandreference_time_index. Previously this raisedNotImplementedError.Messageobjects, each with its per-pulse timestamp and sliced event arrays. Downstream code (accumulator, workflows) is unchanged.[0:]which is a numpy view (no copy).Test plan
MonitorEvents.from_ev44()andDetectorEvents.from_ev44()KafkaToMonitorEventsAdapter,Ev44ToMonitorEventsAdapter,Ev44ToDetectorEventsAdapterAdaptingMessageSourceflattening verified through existing chained adapter test🤖 Generated with Claude Code