Ticket #216 (closed: duplicate)

Opened 12 years ago

Last modified 5 years ago

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:

  1. Tmin<T<T2:

Velocities are calculated in the usual way: v=Ld/T

  1. T2<T<T1

Data at these times are ignored (i.e., they are not used in the wavelength-converted histograms)

  1. 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).

Change History

comment:1 Changed 12 years ago by Russell Taylor

(In [1355]) Correct sign error in monitor position. Re #216.

comment:2 Changed 12 years ago by Russell Taylor

  • Owner set to Russell Taylor

comment:3 Changed 12 years ago by Nick Draper

  • Milestone changed from Iteration 12 to Iteration 13

comment:4 Changed 12 years ago by Russell Taylor

(In [1471]) Removed intolerance of Unwrap to incomplete instrument definitions and reduced logging on loading such instruments. Re #216.

comment:5 Changed 12 years ago by Nick Draper

  • Milestone changed from Iteration 13 to Iteration 14

comment:6 Changed 12 years ago by Nick Draper

  • Milestone changed from Iteration 14 to Unassigned

comment:7 Changed 12 years ago by Russell Taylor

  • Owner Russell Taylor deleted

comment:8 Changed 9 years ago by Nick Draper

  • Status changed from new to closed
  • Resolution set to duplicate

Completed under various other tickets

comment:9 Changed 7 years ago by Nick Draper

  • Milestone changed from Unassigned to Iteration 20

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 1064

Note: See TracTickets for help on using tickets.