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 calculateDIFCCorrection (const double l1, const double l2, const double twotheta, const double offset, const double binWidth)
 Calculate DIFC in case of logarithmic binning, used in CalculateDIFC with Signed mode.
 
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.
 

Variables

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

Detailed Description

The namespace for concrete units classes.

Function Documentation

◆ calculateDIFCCorrection()

double Mantid::Kernel::Units::calculateDIFCCorrection ( const double  l1,
const double  l2,
const double  twotheta,
const double  offset,
const double  binWidth 
)
private

Calculate DIFC in case of logarithmic binning, used in CalculateDIFC with Signed mode.

Parameters
l1
l2
twothetascattering angle
offset
binWidththe bin width used in logarithmic binning (DX) Will calculate the value of DIFC following DIFC = (mn/h) * (L1+L2) * 2sin(theta) * (1 + |DX|)^{-offset}

Definition at line 565 of file Unit.cpp.

References fabs, Mantid::Kernel::l2, and NEUTRON_MASS_OVER_H.

Referenced by Mantid::Geometry::Conversion::calculateDIFCCorrection().

◆ timeConversionValue()

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

◆ timeConversionVector()

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

◆ tofToDSpacingFactor()

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

Variable Documentation

◆ H_OVER_NEUTRON_MASS

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

Definition at line 579 of file Unit.cpp.

Referenced by tofToDSpacingFactor().

◆ NEUTRON_MASS_OVER_H

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

Definition at line 553 of file Unit.cpp.

Referenced by calculateDIFCCorrection().