GetEi
From MantidProject
Contents |
Summary
Calculates the kinetic energy of neutrons leaving the source based on the time it takes for them to travel between two monitors.
Properties
| Order | Name | Direction | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | InputWorkspace | Input | Workspace2D | Mandatory | The X units of this workspace must be time of flight (TOF) with times in microseconds |
| 2 | Monitor1Spec | Output | Workspace2D | Mandatory | The spectrum number of the output of the first monitor, e.g. MAPS 41474, MARI 2, MERLIN 69634 |
| 3 | Monitor2Spec | Input | string | Mandatory | The spectrum number of the output of the second monitor e.g. MAPS 41475, MARI 3, MERLIN 69638 |
| 4 | EnergyEstimate | Input | floating point | Mandatory | An approximate value for the incident energy, energy of neutrons leaving the source (meV) |
| 5 | IncidentEnergy | Output | floating point | - | The energy of neutron in meV, it is also printed to the Mantid's log |
| 6 | FirstMonitorPeak | Output | floating point | - | The time in μs when the count rate of the first monitor, which defaults to the last monitor the beam hits before the sample, is greatest. It is the mean X value for the bin with the highest number of counts per second and is also writen to Mantid's log. |
Description
Uses E= (1/2)mv^2 to calculate the energy of neutrons leaving the source. The velocity is calculated from the time it takes for the neutron pulse to travel between the two monitors whose spectra were specified.
An initial energy guess is required for the algorithm to find the correct peak. The analysis will be done on the highest peak that is within 8% of the estimated TOF given by the estimate.
Not all neutrons arrive at the monitors at the same time because their kinetic energies, and therefore velocities, are all different. The time of arrival of the neutron pulse is taken to be the mean of the two half peak height locations. The half height points are found as follows:
- the peak height is the largest number of counts above the background in any bin in the window
- the half height is half the above number
- examine bins to the left of the bin with the highest number of counts looking for a bin with less than half that number above background
- interpolate between this point bin and the one immediately previous to find the first half height location
- repeat the steps 3 and 4 looking to the left of the highest point to get the second half height point
- the mean of the X-values of the two half height points is the TOF arrival time of the neutrons
The above process is illustrated on a peak is shown below in the image below
The distances between the monitors are read from the instrument definition file. It is assumed that the source and the monitors all lie on one line and that the monitors have the same delay time.
Source Code
Header GetEi.h
Source GetEi.cpp
