Skip to content

[NeXus] Wrap event arrival times with source pulse period #26

@nvaytet

Description

@nvaytet

When writing NeXus files, it would be great to wrap the event arrival times with the source pulse period.
Event data in NeXus is recorded as a pulse time (event_time_zero) and an offset event_time_offset relative to a pulse time (adding these two give an absolute time of arrival).

The event_time_offset is however relative to the most recent pulse, and for long instruments, the offset can 'wrap around' the pulse period, so that events detected with a small event_time_offset are actually associated to the previous pulse (see here for a description).

When converting McStas data to NeXus, we should include this effect. This is essentially just time_of_arrival % pulse_period.
The pulse_period would need to be an input parameter, as it will be different for different facilities (e.g. 14Hz for ESS).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions