Mantid
Loading...
Searching...
No Matches
Classes | Functions | Variables
Mantid::Kernel::Units Namespace Reference

The namespace for concrete units classes. More...

Classes

class  AtomicDistance
 Atomic Distance in Angstroms. More...
 
class  Degrees
 Degrees that has degrees as unit and "Scattering angle" as title. More...
 
class  DeltaE
 Energy transfer in milli-electronvolts. More...
 
class  DeltaE_inFrequency
 Energy transfer in units of frequency (MHz) More...
 
class  DeltaE_inWavenumber
 Energy transfer in units of wavenumber (cm^-1) More...
 
class  dSpacing
 d-Spacing in Angstrom More...
 
class  dSpacingPerpendicular
 d-SpacingPerpendicular in Angstrom More...
 
class  Empty
 Empty unit. More...
 
class  Energy
 Energy in milli-electronvolts. More...
 
class  Energy_inWavenumber
 Absolute energy in units of wavenumber (cm^-1) More...
 
class  Label
 Label unit. More...
 
class  Momentum
 Momentum in Angstrom^-1. More...
 
class  MomentumTransfer
 Momentum Transfer in Angstrom^-1. More...
 
class  Phi
 Phi that has degrees as unit and "Phi" as title. More...
 
class  QSquared
 Momentum transfer squared in Angstrom^-2. More...
 
class  SpinEchoLength
 SpinEchoLength in nm. More...
 
class  SpinEchoTime
 SpinEchoTime in ns. More...
 
class  Symbol
 A simple class containing common symbol types. More...
 
class  Temperature
 Temperature in kelvin. More...
 
class  Time
 Time In Second. More...
 
class  TOF
 Time of flight in microseconds. More...
 
class  Wavelength
 Wavelength in Angstrom. More...
 

Functions

MANTID_KERNEL_DLL double timeConversionValue (const std::string &input_unit, const std::string &output_unit)
 
template<typename T >
void timeConversionVector (std::vector< T > &vec, const std::string &input_unit, const std::string &output_unit)
 
MANTID_KERNEL_DLL double tofToDSpacingFactor (const double l1, const double l2, const double twoTheta, const double offset)
 Calculate and return conversion factor from tof to d-spacing. More...
 

Variables

const double CONSTANT = (PhysicalConstants::h * 1e10) / (2.0 * PhysicalConstants::NeutronMass * 1e6)
 

Detailed Description

The namespace for concrete units classes.

Function Documentation

◆ timeConversionValue()

double Mantid::Kernel::Units::timeConversionValue ( const std::string &  input_unit,
const std::string &  output_unit 
)

Definition at line 1435 of file Unit.cpp.

Referenced by Mantid::DataHandling::firstLastPulseTimes(), and timeConversionVector().

◆ timeConversionVector()

template<typename T >
void Mantid::Kernel::Units::timeConversionVector ( std::vector< T > &  vec,
const std::string &  input_unit,
const std::string &  output_unit 
)

◆ tofToDSpacingFactor()

double Mantid::Kernel::Units::tofToDSpacingFactor ( const double  l1,
const double  l2,
const double  twoTheta,
const double  offset 
)

Calculate and return conversion factor from tof to d-spacing.

Parameters
l1
l2
twoThetascattering angle
offset
Returns

Definition at line 568 of file Unit.cpp.

References CONSTANT, Mantid::Kernel::l2, and Mantid::Kernel::twoTheta.

Referenced by Mantid::API::SpectrumInfo::difcUncalibrated(), Mantid::Geometry::DetectorInfo::difcUncalibrated(), Mantid::Kernel::Units::dSpacing::init(), Mantid::Kernel::Units::MomentumTransfer::init(), and Mantid::Geometry::Conversion::tofToDSpacingFactor().

Variable Documentation

◆ CONSTANT

const double Mantid::Kernel::Units::CONSTANT = (PhysicalConstants::h * 1e10) / (2.0 * PhysicalConstants::NeutronMass * 1e6)

Definition at line 558 of file Unit.cpp.

Referenced by tofToDSpacingFactor().