scippneutron.tof.unwrap.to_time_of_flight#

scippneutron.tof.unwrap.to_time_of_flight(da, origin, ltotal)#

Return the input data with ‘tof’, ‘time_zero’, and corrected ‘Ltotal’ coordinates.

The ‘tof’ coordinate is the time-of-flight of the neutron, i.e., the time difference between the time of arrival of the neutron at the detector, and the time of the neutron at the source or source-chopper. The ‘time_zero’ coordinate is the time of the neutron at the source or source-chopper.

It is critical to compute the ‘time_zero’ coordinate precisely by applying the reverse of the offset to time-of-flight, since this may be used to compute a precise time at the sample position. This is important for sample environments with highly time-dependent properties, since precise event-filtering based on sample environment data may be required.

Return type:

tof.unwrap.TofData (scipp.DataArray)