-
Notifications
You must be signed in to change notification settings - Fork 0
Description
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).