|
|
|
The Computing for Science (CS) group supports ILL scientists, students and visitors in a number of activities including data analysis, instrument simulation and sample simulation.

INX - Program for time-of-flight data reduction
|
|||||||||||
S=A+X+tP | "Sample" run |
E=A+P | "Empty can " run |
C=A | "Cadmium" run |
=> X= S - tE -(1-t)C | |
...where t is the transmission of the sample. It should be noted that when detailed background subtraction is to be made, the "Empty can" runs to be entered should rather be viewed as "Empty instrument" runs since the contribution of the container itself can be measured separately and removed after appropriate corrections. In the absence of any cadmium run, one has to make assumptions about the relative parts scattered before and after the sample, which amounts to choosing the adequate value for the transmission.
For example if
- P=0 -> X=S-E i.e tact=1
- A=P -> X=S-(1+t)/2 E i.e tact=(1+t)/2
- A=0 -> X=S-t E i.e tact=t
Note that this type of correction is rather crude and it doesn't take into account the detailed repartition of the scatterers along the neutron path (which is rather ill-defined in most cases due to the presence of a variety of elements along the beam path). Constant electronic background is not removed unless if t=1.For all these reasons, the possibility of supplementary background removal has been included in the treatment sequence. The background level is determined by moving a N-channel window across each spectrum (N=10); the minimum value obtained is then removed from this spectrum. Note that this background subtraction is performed after summation of sample runs, background runs, Cd runs... but before subtraction. This is to avoid problems arising when "negative" counts appear from overcorrection: it may happen that one gets a final negative elastic peak (at small angles especially) whose level will be taken as the background level due to the procedure employed. The program will then subtract a large negative background (i.e. add a large background in some spectra) and this will usually spoil the whole group of angles.

Vanadium runs are normally used as standards for calibrating the relative efficiencies of detectors with respect to each others (at the incident energy). The treatment of the vanadium is the following:
-First, standard background can be subtracted, just as for any sample run.
Since vanadium scattering is (almost) purely elastic, eventual residual background is also subtracted. A sloped background is removed, whose level is determined from off-peak intensities on both side of the elastic line (-3N to -2N and 2N to 3N where N is twice the theoretical resolution width (calculated from the run parameters (chopper speed)). Two corrections can be applied to vanadium intensities:
-A correction for Debye-Waller attenuation. We have assumed that the DW factor is proportional to T:
...which yields numerically:
exp(-W(k))=exp(-alpha.k2) where alpha=.0067T/3OO
-A correction for self-attenuation is also applied.
The neutron counts per unit energy (here meV) are obtained from the neutron counts per time channel using:

nepp is the actual position of the elastic peak channel, Eelast is obtained from the wavelength and telast is calculated using the mean sample-to-detector distance. Note that this approximation of taking a mean elastic time (and neglecting the difference of distances between detectors) does not affect too much the determination of the actual energy changes of each time channels, except for very large energy transfers. Indeed:

and fluctuations of telast contribute only to second order in delta.Ej calculation if delta.tj << telast:
![]()
It may happen that tj becomes negative. In this case, the neutron counts (that originate from the previous incident pulse) are transferred to the other end of the spectra (i.e. tj is replaced by tj+T where T is the period). Actually, all channels corresponding to energies larger than 9999. meV are transferred.
To improve the statistics or reduce the size of the TOF data, a grouping over angles or over energy channels can be performed. The way of grouping the angles is defined in a standard ASCII file; each line of this file contains the numbers of the detectors to be grouped together
For example
15 25+27 29
...means that counts in detector n°15 to 25 and 27 to 29 will be added into a single spectrum.
In general, due to the different distances between each detector and the sample, the energy of each channel is different from one spectrum to another. Thus, before addition, an interpolation to the energy values corresponding to the first spectrum of the group is performed. Note that each time channel corresponds to a certain energy window. The channel grouping corresponds to an addition of the neutron counts in a larger window, i.e. to an average of neutron counts per energy weighted by the energy widths: We have also added the possibility of obtaining energy channels with constant widths dEw. Since the energy values are no longer related to the inital time channels (Ei=Emin+ i Delta.Ew) longer interpolation procedure is employed in this case.
Due to absorption and scattering losses, the energy and wavevector distribution of the scattering is affected by the geometry of the sample. The presence of a container around the sample also alters the signal coming from the sample itself . This additional signal cannot be simply removed using an empty container measurement since this signal is itself altered by the presence of the sample. The correction procedure should thus take into account these interdependent effects and correct each measurement accordingly. Taking the example of a cylindrical sample enclosed in two concentrical cylindrical containers (e.g. the container and a furnace shielding) ,one will have to perform (n=3) measurement for the correction,namely:
R1: Sample+Containerl+Container2
R2: Container1+Container2
R3: Container2
The true sample scattering S is related to these runs through the equations:
R1= s x SAF:(SIS+C1+C2) + C1 x SAF(C1/S+C1+C2) + C2 x SAF(C2/S+Cl+C2)
R2= C1 xSAF(C1/C1+C2) +C2 x SAF(C2/C1+C2)
R3= C2 xSAF(C2/C2)
One can see that the correction procedure involves n=3 runs and evaluation of n(n+l)t2=6 coefficients. To find the true scattering functions , the above equations have to be solved for every angle and every final neutron energy. On IN5 for example, this requires the evaluation of 128x512(x6) Self Attenuation Factors (SAF). Each SAF is expressed as an integral, and, with the notations of the previous example:

a is the scattering angle (20) and E is the final energy and: where the index j stands for the sequence of components in the system
(e.g Sample, Container 1, container 2 )
Except in the case of simple slabs, the integral has to be calculated numerically and the correction turns out to be extremely time consuming. The calculation time can be reduced however by evaluating the integrals only for a few energies. (The SAFs are in general smooth functions of the energy ). The program only uses Emin, Eelast and Emax.
In the standard treatment programs, the self-absorption corrections can be made for "monotype" systems only. This choice has been made since for standard experiments (using e.g. Aluminium containers) most of the background originates in scattering parts located far away from the sample itself. Composite systems necessitate access to several runs simultaneously and calculation of several SAFs per run. For example, a complete background subtraction for a sample enclosed in a container requires in principle 4 distinct measurements: Sample & Container + Empty instrument & Cadmium runs. For such two components system, n(n+1)/2=3 SAF calculations would be required . Sample in presence of Sample & Container, Container in presence of Sample & Container and Container in presence of Container only. Nevertheless, the SAF calculation routines (SAFSLAB & SAFCYL) can be used for any sequence of up to 1O components. An array containing the parameters used for the SAF calculations has to be given. So, if one wishes to perform detailed corrections, it is recommended to first treat the container & sample data with no SAF corrections to simply remove instrumental background, then use a separate program that would simply solve the coreresponding equations, the SAF factors being calculated using standard SAFCYL & SAFSLAB routines. The parameters to be forwarded to the routines are, for each component of the sequence, the scattering and absorption cross sections as Sigmaa (for 2200m/s neutrons), the density and atomic mass of the compound (used to determine the number of scatterers per unit volume). In the slab geometry, the angle of the plane of the slab with respect to the beam and the thickness of the slab have to be given; in the cylindrical geometry inner and outer radii are requested. In case of a system made of several atomic species, the sigmas and the atomic mass may correspond to one molecule or one unit cell...

Due to the energy dependence of absorption cross-sections and macroscopic scattering cross-sections, the detector efficiencies vary with energy and one has to correct for this dependence. This correction changes with the different types of detectors that are present on the different instruments and even on a single instrument.
Let's consider a standard cylindrical detector filled with 3 He and assume the neutrons are incident on a direction perpendicular to the detector axis (Fig.6. 1). The probability for a neutron to be absorbed (i.e to be detected) is given by:

where mu is the linear absorption coefficient (mu=Sigmaa.N, where N is the number of nuclei per unit volume). Setting z=mu.D2mu.e and changing variables, the efficiency can be expressed as a definite integral function of z only:

This integral can be expressed as:
eff(z)=Pi/2(I1(z)-L1(Z))
where L1(z) is a "modified Struve function" and I1(z) is a modified Bessel function.
To approximate the function, it is interesting to make a power expansion for z close to 0. This expansion can be obtained from the expansions of Ll (z) and 11 (z) or simpler by differentiating the exponential under the integral.(6.2). The coefficients of the expansion an are given by:
![]()
where the Wn are the standard Wallis integrals:
The expression of Wn is given by:
which yield, for the first terms of the expansion:
eff(z)=Pi/4 z -1/3 z2 +Pi/32 z3+...
Such an expression of course is only valid for small z. For large z, eff(z) tends to 1, as can be seen from the integral expression. The function eff(z) increases monotonically from 0 to 1 A graphical representation of eff(z) is given Fig.6.2. On the practical side now, we need an approximation of eff(z) which is fast to compute. So far the function f which has been used for this purpose is:
f(z)=1-exp(-Pi/4z)
..whose expansion in 0 is identical for the terms of orders 0 & 1 and close for the next ones:
eff(z)= Pi/4 z .333 z2 + .098 z3 +...
and f(z)= Pi/4 z - .308 z2 + .0807 z3+...
For large z, both functions tend to 1.
This standard approximation has been drawn fig.6.2. as well and one can see that the maximum relative discrepancy betweeen the two curves is of the order of 5%. An improved approximation could be obtained using where coefficients a & b are determined so as to minimize the discrepancy.(with a=1/2(Pi/4)2-1/3 and b=.2 it reduces to less than 2%).
Typically, the value of z for a standard detector (p=3 bars, D=2.54cm at Lambda=1.8Ang) is 1.1. An other effect which has to be taken into account in the energy dependence of the detector efficiency is the absorption in any material located between the sample and the 3 He. The most obvious contribution comes from the detector walls themselves. For detectors on IN4,5 & 6, the walls are made of stainless steel. For Lambda >4A they are standard absorbers but for Lambda <4A, Bragg scattering occurs in the walls and the effective absorption is no longer simply related to A. In absence of any detailed calibration of the detector only crude approximation can be made. we shall quote below the formulae that have been used in the program but one should remember that they are obviously incorrect, especially when dealing with energies close to the cutoff (4A for steel, 4.5A for aluminium).
The formula actually used in the programs as a function of energy can be found in the listing of DETEFF.FOR.
They correspond to:
-for IN4 detectors [z=1.42 at l.8A]
Eff =.951 exp(-0.0887/sqrt(E))(1-exp(-5.597)/sqrt(E))
-for IN5 detectors
type 1 (p=8 bars d=.9cm) [z=1.03 at 1.8A]
Eff=.951exp(-0.0887/sqrt(E))(l-exp(-4.07/sqrt(E))
type 2 (IN6 type) [z=.83 at 1.8A]
Eff = exp(-0.0565/sqrt(E))(1-exp(-3.284/sqrt(E))
-for IN6 detectors [z=.83 at 1.8A]
For lambda>4A
Eff = exp(-0.0565/sqrt(E))(l-exp(-3.284/sqrt(E))
For lambda<4A
Eff = .94(1-exp(-3.284/sqrt(E))
