scippneutron.tof.unwrap.time_of_flight_origin_wfm#

scippneutron.tof.unwrap.time_of_flight_origin_wfm(frames, clean_detector_frame)[source]#

Compute the time-of-flight origin in the WFM case. For WFM there is not a single time-of-flight “origin”, but one for each subframe.

Parameters:
Return type:

TimeOfFlightOrigin

Notes

To find the time-of-flight origin, we ray-trace the fastest and slowest neutrons of the subframes back to the first chopper to determine the time-of-flight origin. The assumption here is that the first chopper is one of the two wfm choppers. We also assume that the first chopper will be inundated with neutrons from the source, and propagating the boundaries of the frame backwards should thus give us a good estimate of the opening and closing times of the first chopper. There is also the general rule that the longer the instrument, the better the wavelength resolution, so going back to the first chopper also makes sense.

We use this method instead of reading the opening and closing times of the choppers because it is not possible to know in a trivial way which opening and closing times correspond to which subframe at the detector. There is not always a 1-1 mapping between the subframes at the detector and the chopper cutouts (for instance, the DREAM pulse shaping choppers have 8 cutouts, but typically create 2 subframes at the detector). In addition, if the chopper is rotating rapidly, there may be multiple opening and closing times, where the extra subframes get blocked by other choppers further down the beamline.

While developing this method, we attempted several other implementations, which all gave worse results than the current implementation. These are summarized here for reference:

  1. We tried to ray-trace the fastest and slowest neutrons of the subframes back to the point in time and space where they intersected, to get the converging point for all neutrons. This gives a different distance for each subframe, which is not really supported in the current implementation of transform_coords.

  2. A slightly modified version of idea 1. was to ray-trace back to the intersection point for each frame, and then compute a mean distance that would apply to all frames. We then re-traced all subframes back to this mean distance. This seems to give a worse estimate of the time-of-flight origin, probably because in a slightly faulty chopper setup (such as V20), we are not always guaranteed that the neutrons went through the openings they were meant to go through. We are however relatively sure which openings of the first chopper they went through.