scippneutron.tof.unwrap.relation_between_time_of_arrival_and_tof#
- scippneutron.tof.unwrap.relation_between_time_of_arrival_and_tof(frame, frame_start, ltotal)[source]#
Compute the slope and intercept of a linear relationship between time-of-arrival and tof, which can be used to create lookup tables which can give the time-of-flight from the time-of-arrival.
We take the polygons that define the subframes, given by the chopper cascade, and approximate them by straight lines.
- Parameters:
frame (
tof.unwrap.FrameAtDetector
(scippneutron.tof.chopper_cascade.Frame
)) – Frame at the detector.frame_start (
tof.unwrap.FrameAtDetectorStartTime
(scipp.Variable
)) – Time of the start of the frame at the detector.ltotal (
tof.unwrap.Ltotal
(scipp.Variable
)) – Total distance between the source and the detector(s).
- Return type: