Mantid
|
The base units (abstract) class. More...
#include <Unit.h>
Public Member Functions | |
virtual const std::string | caption () const =0 |
The full name of the unit. More... | |
virtual Unit * | clone () const =0 |
virtual std::pair< double, double > | conversionRange () const |
The range where conversion to TOF from given units is monotonic and reversible. More... | |
virtual double | conversionTOFMax () const =0 |
This function returns maximal TOF value still reversibly convertible into the unit. More... | |
virtual double | conversionTOFMin () const =0 |
some units can be converted from TOF only in the range of TOF ; This function returns minimal TOF value still reversibly convertible into the unit. More... | |
double | convertSingleFromTOF (const double xvalue, const double &l1, const int &emode, const UnitParametersMap ¶ms) |
Convert from the time-of-flight to the concrete unit. More... | |
double | convertSingleToTOF (const double xvalue, const double &l1, const int &emode, const UnitParametersMap ¶ms) |
Convert from the concrete unit to time-of-flight. More... | |
void | fromTOF (std::vector< double > &xdata, std::vector< double > &ydata, const double &_l1, const int &_emode, const UnitParametersMap ¶ms) |
void | fromTOF (std::vector< double > &xdata, std::vector< double > &ydata, const double &_l1, const int &_emode, std::initializer_list< std::pair< const UnitParams, double > > params) |
Convert from time-of-flight to the concrete unit. More... | |
virtual void | init ()=0 |
Finalize the initialization. More... | |
void | initialize (const double &_l1, const int &_emode, const UnitParametersMap ¶ms) |
Initialize the unit to perform conversion using singleToTof() and singleFromTof() More... | |
virtual bool | isConvertible () const |
Returns if the unit can be used in conversions. More... | |
bool | isInitialized () const |
virtual const UnitLabel | label () const =0 |
A label for the unit to be printed on axes,. More... | |
bool | operator!= (const Unit &u) const |
bool | operator== (const Unit &u) const |
bool | quickConversion (const Unit &destination, double &factor, double &power) const |
Is conversion by constant multiplication possible? More... | |
bool | quickConversion (std::string destUnitName, double &factor, double &power) const |
Is conversion by constant multiplication possible? More... | |
virtual double | singleFromTOF (const double tof) const =0 |
Convert a single tof value to this unit. More... | |
virtual double | singleToTOF (const double x) const =0 |
Convert a single X value to TOF. More... | |
void | toTOF (std::vector< double > &xdata, std::vector< double > &ydata, const double &_l1, const int &_emode, const UnitParametersMap ¶ms) |
void | toTOF (std::vector< double > &xdata, std::vector< double > &ydata, const double &_l1, const int &_emode, std::initializer_list< std::pair< const UnitParams, double > > params) |
Convert from the concrete unit to time-of-flight. More... | |
Unit () | |
(Empty) Constructor More... | |
virtual const std::string | unitID () const =0 |
The name of the unit. More... | |
virtual | ~Unit ()=default |
Virtual destructor. More... | |
Protected Member Functions | |
void | addConversion (std::string to, const double &factor, const double &power=1.0) const |
Add a 'quick conversion' from the unit class on which this method is called. More... | |
virtual void | validateUnitParams (const int emode, const UnitParametersMap ¶ms) |
Protected Attributes | |
int | emode |
emode :: The energy mode (0=elastic, 1=direct geometry, 2=indirect geometry) More... | |
bool | initialized |
The unit values have been initialized. More... | |
double | l1 |
l1 :: The source-sample distance (in metres) More... | |
const UnitParametersMap * | m_params |
additional parameters l2 :: distance from sample to detector (in metres) twoTheta :: scattering angle in radians efixed :: Value of fixed energy: EI (emode=1) or EF (emode=2) (in meV) difc :: diffractometer constant DIFC More... | |
Private Types | |
using | ConstantAndPower = std::pair< double, double > |
A 'quick conversion' requires the constant by which to multiply the input and the power to which to raise it. More... | |
using | ConversionsMap = tbb::concurrent_unordered_map< std::string, UnitConversions > |
The possible 'quick conversions' are held in a map with the starting unit as the key. More... | |
using | UnitConversions = tbb::concurrent_unordered_map< std::string, ConstantAndPower > |
Lists, for a given starting unit, the units to which a 'quick conversion' can be made. More... | |
Static Private Attributes | |
static ConversionsMap | s_conversionFactors = Unit::ConversionsMap() |
The table of possible 'quick conversions'. More... | |
The base units (abstract) class.
All concrete units should inherit from this class and provide implementations of the caption(), label(), toTOF() and fromTOF() methods. They also need to declare (but NOT define) the unitID() method and register into the UnitFactory via the macro DECLARE_UNIT(classname).
|
private |
|
private |
|
private |
Mantid::Kernel::Unit::Unit | ( | ) |
|
virtualdefault |
Virtual destructor.
|
protected |
Add a 'quick conversion' from the unit class on which this method is called.
to | :: The destination Unit for this conversion (use name returned by the unit's unitID() method) |
factor | :: The constant by which to multiply the input unit |
power | :: The power to which to raise the input unit (defaults to 1) |
Definition at line 113 of file Unit.cpp.
References s_conversionFactors, and unitID().
Referenced by Mantid::Kernel::Units::DeltaE::DeltaE(), Mantid::Kernel::Units::DeltaE_inFrequency::DeltaE_inFrequency(), Mantid::Kernel::Units::DeltaE_inWavenumber::DeltaE_inWavenumber(), Mantid::Kernel::Units::Energy::Energy(), Mantid::Kernel::Units::Energy_inWavenumber::Energy_inWavenumber(), Mantid::Kernel::Units::Momentum::Momentum(), Mantid::Kernel::Units::MomentumTransfer::MomentumTransfer(), and Mantid::Kernel::Units::QSquared::QSquared().
|
pure virtual |
The full name of the unit.
Implemented in Mantid::Kernel::Units::Empty, Mantid::Kernel::Units::Label, Mantid::Kernel::Units::TOF, Mantid::Kernel::Units::Wavelength, Mantid::Kernel::Units::Energy, Mantid::Kernel::Units::Energy_inWavenumber, Mantid::Kernel::Units::dSpacing, Mantid::Kernel::Units::dSpacingPerpendicular, Mantid::Kernel::Units::MomentumTransfer, Mantid::Kernel::Units::QSquared, Mantid::Kernel::Units::DeltaE, Mantid::Kernel::Units::DeltaE_inWavenumber, Mantid::Kernel::Units::DeltaE_inFrequency, Mantid::Kernel::Units::Momentum, Mantid::Kernel::Units::SpinEchoLength, Mantid::Kernel::Units::SpinEchoTime, Mantid::Kernel::Units::Time, Mantid::Kernel::Units::Degrees, Mantid::Kernel::Units::Phi, Mantid::Kernel::Units::Temperature, and Mantid::Kernel::Units::AtomicDistance.
Referenced by export_Unit().
|
pure virtual |
Implemented in Mantid::Kernel::Units::Empty, Mantid::Kernel::Units::Label, Mantid::Kernel::Units::TOF, Mantid::Kernel::Units::Wavelength, Mantid::Kernel::Units::Energy, Mantid::Kernel::Units::Energy_inWavenumber, Mantid::Kernel::Units::dSpacing, Mantid::Kernel::Units::dSpacingPerpendicular, Mantid::Kernel::Units::MomentumTransfer, Mantid::Kernel::Units::QSquared, Mantid::Kernel::Units::DeltaE, Mantid::Kernel::Units::DeltaE_inWavenumber, Mantid::Kernel::Units::DeltaE_inFrequency, Mantid::Kernel::Units::Momentum, Mantid::Kernel::Units::SpinEchoLength, Mantid::Kernel::Units::SpinEchoTime, Mantid::Kernel::Units::Time, Mantid::Kernel::Units::Degrees, Mantid::Kernel::Units::Phi, Mantid::Kernel::Units::Temperature, and Mantid::Kernel::Units::AtomicDistance.
|
virtual |
The range where conversion to TOF from given units is monotonic and reversible.
Definition at line 204 of file Unit.cpp.
References conversionTOFMax(), conversionTOFMin(), and singleFromTOF().
|
pure virtual |
This function returns maximal TOF value still reversibly convertible into the unit.
Implemented in Mantid::Kernel::Units::Empty, Mantid::Kernel::Units::TOF, Mantid::Kernel::Units::Wavelength, Mantid::Kernel::Units::Energy, Mantid::Kernel::Units::Energy_inWavenumber, Mantid::Kernel::Units::dSpacing, Mantid::Kernel::Units::dSpacingPerpendicular, Mantid::Kernel::Units::MomentumTransfer, Mantid::Kernel::Units::QSquared, Mantid::Kernel::Units::DeltaE, Mantid::Kernel::Units::DeltaE_inWavenumber, Mantid::Kernel::Units::DeltaE_inFrequency, Mantid::Kernel::Units::Momentum, Mantid::Kernel::Units::SpinEchoLength, Mantid::Kernel::Units::SpinEchoTime, Mantid::Kernel::Units::Time, Mantid::Kernel::Units::Degrees, Mantid::Kernel::Units::Temperature, and Mantid::Kernel::Units::AtomicDistance.
Referenced by conversionRange().
|
pure virtual |
some units can be converted from TOF only in the range of TOF ; This function returns minimal TOF value still reversibly convertible into the unit.
Implemented in Mantid::Kernel::Units::Empty, Mantid::Kernel::Units::TOF, Mantid::Kernel::Units::Wavelength, Mantid::Kernel::Units::Energy, Mantid::Kernel::Units::Energy_inWavenumber, Mantid::Kernel::Units::dSpacing, Mantid::Kernel::Units::dSpacingPerpendicular, Mantid::Kernel::Units::MomentumTransfer, Mantid::Kernel::Units::QSquared, Mantid::Kernel::Units::DeltaE, Mantid::Kernel::Units::DeltaE_inWavenumber, Mantid::Kernel::Units::DeltaE_inFrequency, Mantid::Kernel::Units::Momentum, Mantid::Kernel::Units::SpinEchoLength, Mantid::Kernel::Units::SpinEchoTime, Mantid::Kernel::Units::Time, Mantid::Kernel::Units::Degrees, Mantid::Kernel::Units::Temperature, and Mantid::Kernel::Units::AtomicDistance.
Referenced by conversionRange().
double Mantid::Kernel::Unit::convertSingleFromTOF | ( | const double | xvalue, |
const double & | l1, | ||
const int & | emode, | ||
const UnitParametersMap & | params | ||
) |
Convert from the time-of-flight to the concrete unit.
Convert a single value from TOF.
TOF is in microseconds.
xvalue | :: A single X-value to convert |
l1 | :: The source-sample distance (in metres) |
emode | :: The energy mode (0=elastic, 1=direct geometry, 2=indirect geometry) |
params | :: Map containing optional parameters eg The sample-detector distance (in metres) The scattering angle (in radians) Fixed energy: EI (emode=1) or EF (emode=2)(in meV) Delta (not currently used) |
xvalue | |
l1 | |
emode | |
params | (eg efixed or delta) |
Definition at line 198 of file Unit.cpp.
References emode, initialize(), and singleFromTOF().
Referenced by Mantid::Kernel::UnitConversion::convertViaTOF(), Mantid::Crystal::AnvredCorrection::exec(), and Mantid::Crystal::AnvredCorrection::execEvent().
double Mantid::Kernel::Unit::convertSingleToTOF | ( | const double | xvalue, |
const double & | l1, | ||
const int & | emode, | ||
const UnitParametersMap & | params | ||
) |
Convert from the concrete unit to time-of-flight.
Convert a single value to TOF.
TOF is in microseconds.
xvalue | :: A single X-value to convert |
l1 | :: The source-sample distance (in metres) |
emode | :: The energy mode (0=elastic, 1=direct geometry, 2=indirect geometry) |
params | :: Map containing optional parameters eg The sample-detector distance (in metres) The scattering angle (in radians) Fixed energy: EI (emode=1) or EF (emode=2)(in meV) Delta (not currently used) |
xvalue | |
l1 | |
emode | |
params | (eg efixed or delta) |
Definition at line 168 of file Unit.cpp.
References emode, initialize(), and singleToTOF().
Referenced by Mantid::Kernel::UnitConversion::convertViaTOF().
void Mantid::Kernel::Unit::fromTOF | ( | std::vector< double > & | xdata, |
std::vector< double > & | ydata, | ||
const double & | _l1, | ||
const int & | _emode, | ||
const UnitParametersMap & | params | ||
) |
Definition at line 183 of file Unit.cpp.
References initialize(), singleFromTOF(), and UNUSED_ARG.
void Mantid::Kernel::Unit::fromTOF | ( | std::vector< double > & | xdata, |
std::vector< double > & | ydata, | ||
const double & | _l1, | ||
const int & | _emode, | ||
std::initializer_list< std::pair< const UnitParams, double > > | params | ||
) |
Convert from time-of-flight to the concrete unit.
Perform the conversion to TOF on a vector of data.
TOF is in microseconds.
xdata | :: The array of X data to be converted |
ydata | :: Not currently used (ConvertUnits passes an empty vector) |
_l1 | :: The source-sample distance (in metres) |
_emode | :: The energy mode (0=elastic, 1=direct geometry, 2=indirect geometry) |
params | :: Map containing optional parameters eg The sample-detector distance (in metres) The scattering angle (in radians) Fixed energy: EI (emode=1) or EF (emode=2)(in meV) Delta (not currently used) |
Definition at line 177 of file Unit.cpp.
References fromTOF().
Referenced by Mantid::Algorithms::AlignDetectors::align(), Mantid::Crystal::NormaliseVanadium::exec(), fromTOF(), Mantid::Crystal::CentroidPeaks::integrate(), and Mantid::Crystal::CentroidPeaks::integrateEvent().
|
pure virtual |
Finalize the initialization.
This will be overridden by subclasses as needed.
Implemented in Mantid::Kernel::Units::Empty, Mantid::Kernel::Units::TOF, Mantid::Kernel::Units::Wavelength, Mantid::Kernel::Units::Energy, Mantid::Kernel::Units::Energy_inWavenumber, Mantid::Kernel::Units::dSpacing, Mantid::Kernel::Units::dSpacingPerpendicular, Mantid::Kernel::Units::MomentumTransfer, Mantid::Kernel::Units::DeltaE, Mantid::Kernel::Units::DeltaE_inWavenumber, Mantid::Kernel::Units::DeltaE_inFrequency, Mantid::Kernel::Units::Momentum, Mantid::Kernel::Units::SpinEchoLength, Mantid::Kernel::Units::SpinEchoTime, Mantid::Kernel::Units::Time, Mantid::Kernel::Units::Degrees, Mantid::Kernel::Units::Temperature, and Mantid::Kernel::Units::AtomicDistance.
Referenced by initialize().
void Mantid::Kernel::Unit::initialize | ( | const double & | _l1, |
const int & | _emode, | ||
const UnitParametersMap & | params | ||
) |
Initialize the unit to perform conversion using singleToTof() and singleFromTof()
_l1 | :: The source-sample distance (in metres) |
_emode | :: The energy mode (0=elastic, 1=direct geometry, 2=indirect geometry) |
params | :: map containing other optional parameters: The sample-detector distance (in metres) The scattering angle (in radians) Fixed energy: EI (emode=1) or EF (emode=2) (in meV) Diffractometer constants (DIFA, DIFC, TZERO) Delta: unused |
_l1 | :: The source-sample distance (in metres) |
_emode | :: The energy mode (0=elastic, 1=direct geometry, 2=indirect geometry) |
params | :: Map containing optional parameters eg The sample-detector distance (in metres) The scattering angle (in radians) Fixed energy: EI (emode=1) or EF (emode=2)(in meV) Delta (not currently used) |
Definition at line 132 of file Unit.cpp.
References emode, init(), initialized, l1, m_params, and validateUnitParams().
Referenced by Mantid::Algorithms::AlignDetectors::align(), Mantid::Crystal::LoadIsawPeaks::appendFile(), Mantid::Kernel::Units::dSpacing::calcTofMax(), Mantid::Kernel::Units::dSpacing::calcTofMin(), convertSingleFromTOF(), convertSingleToTOF(), Mantid::Crystal::PeakHKLErrors::createNewPeak(), Mantid::Crystal::SCDPanelErrors::eval(), Mantid::Algorithms::ApplyInstrumentToPeaks::exec(), Mantid::Algorithms::CalculatePlaczek::exec(), Mantid::Algorithms::PDCalibration::exec(), Mantid::Crystal::SCDCalibratePanels::findT0(), fromTOF(), Mantid::Crystal::SCDCalibratePanels2ObjFunc::function1D(), Mantid::Algorithms::BackgroundHelper::removeBackground(), and toTOF().
|
inlinevirtual |
Returns if the unit can be used in conversions.
Reimplemented in Mantid::Kernel::Units::Empty, and Mantid::Kernel::Units::Time.
|
inline |
Definition at line 176 of file Unit.h.
Referenced by Mantid::DataObjects::EventList::convertUnitsViaTof(), Mantid::Kernel::Units::dSpacing::singleFromTOF(), and Mantid::Kernel::Units::dSpacing::singleToTOF().
|
pure virtual |
A label for the unit to be printed on axes,.
Implemented in Mantid::Kernel::Units::Empty, Mantid::Kernel::Units::Label, Mantid::Kernel::Units::TOF, Mantid::Kernel::Units::Wavelength, Mantid::Kernel::Units::Energy, Mantid::Kernel::Units::Energy_inWavenumber, Mantid::Kernel::Units::dSpacing, Mantid::Kernel::Units::dSpacingPerpendicular, Mantid::Kernel::Units::MomentumTransfer, Mantid::Kernel::Units::QSquared, Mantid::Kernel::Units::DeltaE, Mantid::Kernel::Units::DeltaE_inWavenumber, Mantid::Kernel::Units::DeltaE_inFrequency, Mantid::Kernel::Units::Momentum, Mantid::Kernel::Units::SpinEchoLength, Mantid::Kernel::Units::SpinEchoTime, Mantid::Kernel::Units::Time, Mantid::Kernel::Units::Degrees, Mantid::Kernel::Units::Temperature, and Mantid::Kernel::Units::AtomicDistance.
Referenced by export_Unit().
bool Mantid::Kernel::Unit::operator!= | ( | const Unit & | u | ) | const |
bool Mantid::Kernel::Unit::operator== | ( | const Unit & | u | ) | const |
bool Mantid::Kernel::Unit::quickConversion | ( | const Unit & | destination, |
double & | factor, | ||
double & | power | ||
) | const |
Is conversion by constant multiplication possible?
Look to see if conversion from the unit upon which this method is called requires only multiplication by a constant and not detector information (i.e. distance & angle), in which case doing the conversion via time-of-flight is not necessary.
destination | :: The unit to which conversion is sought |
factor | :: Returns the constant by which to multiply the input unit (if a conversion is found) |
power | :: Returns the power to which to raise the unput unit (if a conversion is found) |
Definition at line 62 of file Unit.cpp.
References quickConversion(), and unitID().
Referenced by Mantid::Kernel::UnitConversion::convertToElasticQ(), quickConversion(), and Mantid::Kernel::UnitConversion::run().
bool Mantid::Kernel::Unit::quickConversion | ( | std::string | destUnitName, |
double & | factor, | ||
double & | power | ||
) | const |
Is conversion by constant multiplication possible?
Look to see if conversion from the unit upon which this method is called requires only multiplication by a constant and not detector information (i.e. distance & angle), in which case doing the conversion via time-of-flight is not necessary.
destUnitName | :: The class name of the unit to which conversion is sought |
factor | :: Returns the constant by which to multiply the input unit (if a conversion is found) |
power | :: Returns the power to which to raise the unput unit (if a conversion is found) |
Definition at line 82 of file Unit.cpp.
References s_conversionFactors, and unitID().
|
pure virtual |
Convert a single tof value to this unit.
tof | value to convert |
Implemented in Mantid::Kernel::Units::Empty, Mantid::Kernel::Units::TOF, Mantid::Kernel::Units::Wavelength, Mantid::Kernel::Units::Energy, Mantid::Kernel::Units::Energy_inWavenumber, Mantid::Kernel::Units::dSpacing, Mantid::Kernel::Units::dSpacingPerpendicular, Mantid::Kernel::Units::MomentumTransfer, Mantid::Kernel::Units::QSquared, Mantid::Kernel::Units::DeltaE, Mantid::Kernel::Units::Momentum, Mantid::Kernel::Units::SpinEchoLength, Mantid::Kernel::Units::SpinEchoTime, Mantid::Kernel::Units::Time, Mantid::Kernel::Units::Degrees, Mantid::Kernel::Units::Temperature, and Mantid::Kernel::Units::AtomicDistance.
Referenced by conversionRange(), convertSingleFromTOF(), Mantid::DataObjects::EventList::convertUnitsViaTofHelper(), and fromTOF().
|
pure virtual |
Convert a single X value to TOF.
x | value to convert |
Implemented in Mantid::Kernel::Units::Momentum, Mantid::Kernel::Units::Empty, Mantid::Kernel::Units::TOF, Mantid::Kernel::Units::Wavelength, Mantid::Kernel::Units::Energy, Mantid::Kernel::Units::Energy_inWavenumber, Mantid::Kernel::Units::dSpacing, Mantid::Kernel::Units::dSpacingPerpendicular, Mantid::Kernel::Units::MomentumTransfer, Mantid::Kernel::Units::QSquared, Mantid::Kernel::Units::DeltaE, Mantid::Kernel::Units::SpinEchoLength, Mantid::Kernel::Units::SpinEchoTime, Mantid::Kernel::Units::Time, Mantid::Kernel::Units::Degrees, Mantid::Kernel::Units::Temperature, and Mantid::Kernel::Units::AtomicDistance.
Referenced by convertSingleToTOF(), Mantid::DataObjects::EventList::convertUnitsViaTofHelper(), Mantid::Algorithms::BackgroundHelper::removeBackground(), and toTOF().
void Mantid::Kernel::Unit::toTOF | ( | std::vector< double > & | xdata, |
std::vector< double > & | ydata, | ||
const double & | _l1, | ||
const int & | _emode, | ||
const UnitParametersMap & | params | ||
) |
Definition at line 153 of file Unit.cpp.
References initialize(), singleToTOF(), and UNUSED_ARG.
void Mantid::Kernel::Unit::toTOF | ( | std::vector< double > & | xdata, |
std::vector< double > & | ydata, | ||
const double & | _l1, | ||
const int & | _emode, | ||
std::initializer_list< std::pair< const UnitParams, double > > | params | ||
) |
Convert from the concrete unit to time-of-flight.
Perform the conversion to TOF on a vector of data.
TOF is in microseconds.
xdata | :: The array of X data to be converted |
ydata | :: Not currently used (ConvertUnits passes an empty vector) |
_l1 | :: The source-sample distance (in metres) |
_emode | :: The energy mode (0=elastic, 1=direct geometry, 2=indirect geometry) |
params | :: Map containing optional parameters eg The sample-detector distance (in metres) The scattering angle (in radians) Fixed energy: EI (emode=1) or EF (emode=2)(in meV) Delta (not currently used) |
Definition at line 147 of file Unit.cpp.
References toTOF().
Referenced by Mantid::DataHandling::SaveGDA::exec(), Mantid::Algorithms::PDCalibration::FittedPeaks::setPositions(), and toTOF().
|
pure virtual |
The name of the unit.
For a concrete unit, this method's definition is in the DECLARE_UNIT macro and it will return the argument passed to that macro (which is the unit's key in the factory).
Implemented in Mantid::Kernel::Units::Empty, Mantid::Kernel::Units::Label, Mantid::Kernel::Units::TOF, Mantid::Kernel::Units::Wavelength, Mantid::Kernel::Units::Energy, Mantid::Kernel::Units::Energy_inWavenumber, Mantid::Kernel::Units::dSpacing, Mantid::Kernel::Units::dSpacingPerpendicular, Mantid::Kernel::Units::MomentumTransfer, Mantid::Kernel::Units::QSquared, Mantid::Kernel::Units::DeltaE, Mantid::Kernel::Units::DeltaE_inWavenumber, Mantid::Kernel::Units::DeltaE_inFrequency, Mantid::Kernel::Units::Momentum, Mantid::Kernel::Units::SpinEchoLength, Mantid::Kernel::Units::SpinEchoTime, Mantid::Kernel::Units::Time, Mantid::Kernel::Units::Degrees, Mantid::Kernel::Units::Phi, Mantid::Kernel::Units::Temperature, and Mantid::Kernel::Units::AtomicDistance.
Referenced by addConversion(), export_Unit(), Mantid::API::SpectrumInfo::getDetectorValues(), operator==(), and quickConversion().
|
protectedvirtual |
Reimplemented in Mantid::Kernel::Units::Wavelength, Mantid::Kernel::Units::Energy, Mantid::Kernel::Units::Energy_inWavenumber, Mantid::Kernel::Units::dSpacing, Mantid::Kernel::Units::dSpacingPerpendicular, Mantid::Kernel::Units::MomentumTransfer, Mantid::Kernel::Units::DeltaE, and Mantid::Kernel::Units::Momentum.
Definition at line 141 of file Unit.cpp.
Referenced by initialize().
|
protected |
emode :: The energy mode (0=elastic, 1=direct geometry, 2=indirect geometry)
Definition at line 206 of file Unit.h.
Referenced by Mantid::Kernel::Units::Momentum::conversionTOFMax(), Mantid::Kernel::Units::Wavelength::conversionTOFMin(), Mantid::Kernel::Units::DeltaE::conversionTOFMin(), Mantid::Kernel::Units::Momentum::conversionTOFMin(), convertSingleFromTOF(), convertSingleToTOF(), Mantid::Kernel::Units::Wavelength::init(), Mantid::Kernel::Units::DeltaE::init(), Mantid::Kernel::Units::Momentum::init(), Mantid::Kernel::Units::SpinEchoLength::init(), Mantid::Kernel::Units::SpinEchoTime::init(), initialize(), Mantid::Kernel::Units::DeltaE::singleFromTOF(), Mantid::Kernel::Units::Momentum::singleToTOF(), Mantid::Kernel::Units::Wavelength::singleToTOF(), Mantid::Kernel::Units::DeltaE::singleToTOF(), Mantid::Kernel::Units::DeltaE::validateUnitParams(), and Mantid::Kernel::Units::Momentum::validateUnitParams().
|
protected |
The unit values have been initialized.
Definition at line 201 of file Unit.h.
Referenced by initialize().
|
protected |
l1 :: The source-sample distance (in metres)
Definition at line 203 of file Unit.h.
Referenced by Mantid::Kernel::Units::Wavelength::init(), Mantid::Kernel::Units::Energy::init(), Mantid::Kernel::Units::Energy_inWavenumber::init(), Mantid::Kernel::Units::dSpacing::init(), Mantid::Kernel::Units::dSpacingPerpendicular::init(), Mantid::Kernel::Units::MomentumTransfer::init(), Mantid::Kernel::Units::DeltaE::init(), Mantid::Kernel::Units::Momentum::init(), and initialize().
|
protected |
additional parameters l2 :: distance from sample to detector (in metres) twoTheta :: scattering angle in radians efixed :: Value of fixed energy: EI (emode=1) or EF (emode=2) (in meV) difc :: diffractometer constant DIFC
Definition at line 212 of file Unit.h.
Referenced by Mantid::Kernel::Units::Wavelength::init(), Mantid::Kernel::Units::Energy::init(), Mantid::Kernel::Units::Energy_inWavenumber::init(), Mantid::Kernel::Units::dSpacing::init(), Mantid::Kernel::Units::dSpacingPerpendicular::init(), Mantid::Kernel::Units::MomentumTransfer::init(), Mantid::Kernel::Units::DeltaE::init(), Mantid::Kernel::Units::Momentum::init(), Mantid::Kernel::Units::SpinEchoLength::init(), Mantid::Kernel::Units::SpinEchoTime::init(), and initialize().
|
staticprivate |
The table of possible 'quick conversions'.
Definition at line 225 of file Unit.h.
Referenced by addConversion(), and quickConversion().