Skip to content

filewriter: Neutron event data (raw_data_1/detector_1_events) #83

Open

Description

@Tom-Willemsen

The filewriter must be able to write out event-mode data.

This means the contents of the NXevent_data group in raw_data_1/detector_1_events

Questions

  • What do we want to do with event_time_bins, which aren't meaningful in streaming system?
  • Due to an underlying UDP connection from hardware, the streaming system cannot guarantee that frame N+1 will have a later reference_time than frame N. Do any consumers make assumptions about this?
    • This affects whether we can stream events to file directly, or whether we have to buffer, sort by reference time, and then write to file
  • Does mantid have a dependency on event time-of-flights being ordered within a frame? Currently this sort is (optionally) done at event_aggregator level as multiple consumers benefit from improved performance with sorted events.

Potential differences from existing files

  • We likely no longer need to apply a random event_time_offset_shift, as the new electronics has a much higher time resolution than the old DAE electronics. See random time offset shift #22 .
  • We want to be able to write the veto flags for each frame alongside the event data, to enable downstream consumers to retroactively enable or disable a veto if it chooses:
    • active_vetos: the veto signals that were actually active for a given frame
    • enabled_vetos: the vetoes that were enabled in IBEX at the time of data acquisition
    • By default downstream consumers will want to mask any events where active_vetos & enabled_vetos != 0.
    • If adding this logic is problematic for Mantid, we could (optionally) drop the frames at filewriter level instead - at the cost of reducing flexibility and reducing diagnostics we have access to.

Activity

  1. added this to the March 2027 milestone on Jul 27, 2026
  2. martyngigg commented on Aug 3, 2026

    @martyngigg

    For reference, the logic in Mantid to determine whether to apply the randomisation itself will return False if event_time_offset_shift is missing and the program name is not ISISICP.EXE.

    If we're pretty confident this can all be dealt with by the streaming side of things then dropping event_time_offset_shift and setting program_name to something else will make Mantid do what we want it to do.

  3. martyngigg commented on Aug 3, 2026

    @martyngigg

    For event sorting, it looks like event_index is required to be sorted.

    The details on ordering of events in a frame are a little more challenging to understand and need further investigation. It's not clear from the loading code if a sort happens internally on load every time.

  4. changed the title [-]`filewriter`: Neutron event data[/-] [+]`filewriter`: Neutron event data (`raw_data_1/detector_1_events`)[/+] on Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions