Unit Factory
From MantidProject
What is it?
The Unit Factory is a Dynamic Factory that creates and hands out instances of Mantid Unit objects.
Available units
The following units are available in the default Mantid distribution.
| Name | ID (as known by Unit Factory) | Unit | Relevant equation |
|---|---|---|---|
| Time of flight | TOF | μs | TOF |
| Wavelength | Wavelength |
|
|
| Energy | Energy | meV |
|
| d-spacing | dSpacing |
|
|
| Momentum transfer (Q) | MomentumTransfer |
|
|
| Momentum transfer squared (Q2) | QSquared |
|
|
| Energy transfer | DeltaE | meV |
|
| Energy transfer in wavenumber | DeltaE_inWavenumber | cm − 1 | 8.06554465ΔE |
Where L1 and L2 are sample to the source and sample to detector distances respectively, Ltot = L1 + L2 and Ei is the energy of neutrons leaving the source.
Adding new units
Writing and adding a new unit is relatively straightforward. Instructions will appear here in due course. In the meantime if a unit that you require is missing, then please contact the development team and we will add it to the default Mantid library.
