Ticket #216 (closed: duplicate)
Generalise Unwrap algorithm
Reported by: | Russell Taylor | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | Iteration 20 |
Component: | Keywords: | ||
Cc: | Blocked By: | ||
Blocking: | Tester: |
Description
Paolo has the following ideas for how the Unwrap algorithm. It boils down to generalising it so that instead of providing LRef, the necessary information can be calculated from the Geometry & data.
With respect to the original algorithm, I think we should make a couple of very simple changes to make it more amenable for use with the geometry. I refer to the notations I used in my previous e-mail (see ticket #177). This approach should work with all white-beam instruments (most instruments at ISIS, except for the chopper spectrometers).
The input parameters are:
DeltaT, vmax, vmin, Lref. If Lref is present, vmax and vmin can have default values. If vmax and vmin are present, Lref is not used.
The default values are:
DeltaT=Tmax-Tmin (these being the min and max times in the TOF frame)
vmax=Lref/Tmin
vmin=Lref/Tmax
Then, the calculation proceeds in a very similar way as before, with the definitions:
T1=DeltaT+Ld/vmax or T1=DeltaT if vmax=infinity or a negative number
T2=Ld/vmin
Neutron velocities (and hence wavelengths) for the detector D at distance Ld are calculated in the following way:
- Tmin<T<T2:
Velocities are calculated in the usual way: v=Ld/T
- T2<T<T1
Data at these times are ignored (i.e., they are not used in the wavelength-converted histograms)
- T1<T<Tmax
Velocities for these points are calculated using the formula v=Ld/(T-DeltaT)
As I noted in the previous e-mail, some of the detectors (particularly transmission monitors) can be frame-overlapped. This happens for
Ld>DeltaT*(1/vmin-1/vmax)-1
In this case, T1<T2, and all the points between T1 and T2 should be masked out. This will result in a useful wavelength range that is smaller than for the other detectors.
Should we have access to geometrical/frequency/phase information of the choppers, the input values can all be calculated (and Lref becomes unnecessary) as follows (I write this for future reference):
vmax=d_chop/Topen
vmin=d_chop/Tclose
DeltaT=1/Frequency
Note that there could be more than one chopper, in which case vmax=min(vmax1, vmax2…), vmin=max(vmin1, vmin2…), and DeltaT=max(DeltaT1, DeltaT2…).
Topen and Tclose can be calculated from the chopper phase, which should be logged, and from the chopper opening angle alpha and the offset between the pick-up and the slit opening, which are geometrical properties.
Topen=phase+offset/(2*Pi*frequency)
Tclose=Topen+alpha/(2*Pi*frequency)
If Tclose>DeltaT then Tclose=Tclose-DeltaT and Topen=Topen-DeltaT (this can be iterated, although it is unlikely that anyone would set the choppers more than one frame ahead)
Note also that Topen can be zero or negative, in which case vmax=infinity or a negative number (the case is dealt with above).
(In [1355]) Correct sign error in monitor position. Re #216.