scippneutron.tof.unwrap.offset_from_wrapped#
- scippneutron.tof.unwrap.offset_from_wrapped(wrapped_time_offset, frame_bounds, frame_period)[source]#
Offset of the input time offsets from the start of the frame emitting the neutron.
In other words, this is the part that is “lost” by the conceptual wrapping of the time offsets at the frame period. This is the offset that needs to be added to the NXevent_data/event_time_offset to obtain the offset from the start of the emitting frame.
This is not identical to the offset to time-of-flight, since the time-of-flight is measured, e.g., from the center of the pulse, to the center of a pulse-shaping chopper slit.
Note that this takes the frame-period, which can be a multiple of a pulse-period. The input time stamps must be relative the the start of the frame, i.e., in pulse-skipping mode a pulse offset must have been applied before calling this function.
- Parameters:
wrapped_time_offset (
tof.unwrap.FrameWrappedTimeOffset
(scipp.Variable
)) – Time offset from the time-zero as recorded by the data acquisition system.frame_bounds (
tof.unwrap.FrameBounds
(scipp.DataGroup
)) – The computed frame boundaries, used to unwrap the raw timestamps. Typically pixel-dependent when unwrapping detectors.frame_period (
tof.unwrap.FramePeriod
(scipp.Variable
)) – Time between the start of two consecutive frames, i.e., the period of the time-zero used by the data acquisition system.
- Return type: