Skip to content

Commit

Permalink
Refs #7149 added WIKI comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jmborr committed May 20, 2013
1 parent 332e58f commit 248e968
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions Code/Mantid/Framework/Algorithms/src/ModeratorTzeroLinear.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
/*WIKI*
This algorithm Corrects the time of flight (TOF) of an indirect geometry instrument by substracting a time offset <math>t_0</math> dependent
on the initial neutron energy being emitted through the moderator.
This algorithm Corrects the time of flight (TOF) of an indirect geometry instrument by substracting a time offset <math>t_0</math>
linearly dependent on the wavelenght of the neutron when emitted through the moderator. This algorithm is suitable to data reduction
of indirect instruments featuring a neutron flux with a narrow distribution of wavelenghts.
A heuristic formula for the correction, stored in the instrument definition file, is taken as linear on the initial
neutron wavelength <math>\lambda_i</math>:
<math>t_0 = a * \lambda_i + b</math>, [a]=microsec/Angstrom and [b]=microsec
<math>t_0 = a * \lambda_i + b</math>, [a]=microsec/Angstrom and [b]=microsec.
Below is the example XML code included in BASIS beamline parameters file.
<pre>
<!-- Moderator Tzero/LambdaZero Parameters -->
<parameter name="Moderator.TimeZero.Gradient">
<value val="11.967"/>
</parameter>
<parameter name="Moderator.TimeZero.Intercept">
<value val="-5.0"/>
</parameter>
</pre>
The recorded TOF: <math>TOF = t_0 + t_i + t_f</math>, with
#<math>t_0</math>: moderator emission time
#<math>t_0</math>: emission time from the moderator
#<math>t_i</math>: time from moderator to sample
#<math>t_f</math>: time from sample to detector
Expand All @@ -17,11 +29,13 @@ For an indirect geometry instrument, <math>\lambda_i</math> is not known but the
selected by the analyzers is known. For this geometry:
#<math>t_f = L_f/v_f</math>, with <math>L_f</math>: distance from sample to detector, <math>v_f</math>: final velocity derived from <math>E_f</math>
#<math>t_i = L_i/v_i</math>, with <math>L_i</math>: distance from moderator to sample, <math>v_i</math>: initial velocity unknown
#<math>t_0 = a'/v_i+b'</math>, with a' and b' constants derived from the aforementioned heuristic formula <math>a' = a \cdot 3.956 \cdot 10^{-3}</math> with [a']=meter, and <math>b' = b</math> with [b']=microsec
#<math>t_0 = a'/v_i+b'</math>, with a' and b' constants derived from the aforementioned heuristic formula <math>a' = a \cdot 3.956 \cdot 10^{-3}</math> with [a']=meter,
and <math>b' = b</math> with [b']=microsec
Putting all together: <math>TOF' = \frac{L_i}{L_i+a'} \cdot (TOF-t_f-b') + t_f</math>, with [TOF']=microsec
If the detector is a monitor, then we can treat it as both sample and detector. Thus, we use the previous formula inserting the time from sample to detector <math>t_f = 0</math> and with the initial fligh path <math>L_i</math> as the distance from source to monitor.
If the detector is a monitor, then we can treat it as both sample and detector. Thus, we use the previous formula inserting the time from sample
to detector <math>t_f = 0</math> and with the initial fligh path <math>L_i</math> as the distance from source to monitor.
*WIKI*/

Expand All @@ -47,8 +61,8 @@ DECLARE_ALGORITHM(ModeratorTzeroLinear)
/// Sets documentation strings for this algorithm
void ModeratorTzeroLinear::initDocs()
{
setWikiSummary("For an indirect geometry instrument, subtracts to the time of flight a quantity dependent on the initial neutron energy.");
setOptionalMessage(" Corrects the time of flight of an indirect geometry instrument by a time offset that is dependent on the velocity of the neutron after passing through the moderator.");
setWikiSummary("Corrects the time of flight of an indirect geometry instrument by a time offset that is linearly dependent on the wavelength of the neutron after passing through the moderator.");
setOptionalMessage(" Corrects the time of flight of an indirect geometry instrument by a time offset that is linearly dependent on the wavelength of the neutron after passing through the moderator.");
}

using namespace Mantid::Kernel;
Expand Down

0 comments on commit 248e968

Please sign in to comment.