|
Mantid
|
Energy transfer in milli-electronvolts. More...
Public Member Functions | |
| const std::string | caption () const override |
| The full name of the unit. | |
| Unit * | clone () const override |
| double | conversionTOFMax () const override |
| This function returns maximal TOF value still reversibly convertible into the unit. | |
| double | conversionTOFMin () const override |
| 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. | |
| DeltaE () | |
| Constructor. | |
| void | init () override |
| Finalize the initialization. | |
| const UnitLabel | label () const override |
| A label for the unit to be printed on axes,. | |
| double | singleFromTOF (const double tof) const override |
| Convert a single tof value to this unit. | |
| double | singleToTOF (const double x) const override |
| Convert a single X value to TOF. | |
| const std::string | unitID () const override |
| "DeltaE" | |
Public Member Functions inherited from Mantid::Kernel::Unit | |
| virtual std::pair< double, double > | conversionRange () const |
| The range where conversion to TOF from given units is monotonic and reversible. | |
| double | convertSingleFromTOF (const double xvalue, const double &l1, const int &emode, const UnitParametersMap ¶ms) |
| Convert from the time-of-flight to the concrete unit. TOF is in microseconds. | |
| double | convertSingleToTOF (const double xvalue, const double &l1, const int &emode, const UnitParametersMap ¶ms) |
| Convert from the concrete unit to time-of-flight. TOF is in microseconds. | |
| void | fromTOF (std::vector< double > &xdata, std::vector< double > const &ydata, const double &_l1, const int &_emode, const UnitParametersMap ¶ms) |
| void | fromTOF (std::vector< double > &xdata, std::vector< double > const &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. | |
| void | initialize (const double &_l1, const int &_emode, const UnitParametersMap ¶ms) |
| Initialize the unit to perform conversion using singleToTof() and singleFromTof() | |
| virtual bool | isConvertible () const |
| Returns if the unit can be used in conversions. | |
| bool | isInitialized () const |
| 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? | |
| bool | quickConversion (std::string destUnitName, double &factor, double &power) const |
| Is conversion by constant multiplication possible? | |
| void | toTOF (std::vector< double > &xdata, std::vector< double > const &ydata, const double &_l1, const int &_emode, const UnitParametersMap ¶ms) |
| void | toTOF (std::vector< double > &xdata, std::vector< double > const &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. | |
| Unit () | |
| (Empty) Constructor | |
| virtual | ~Unit ()=default |
| Virtual destructor. | |
Protected Member Functions | |
| void | validateUnitParams (const int emode, const UnitParametersMap ¶ms) override |
Protected Member Functions inherited from Mantid::Kernel::Unit | |
| 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. | |
Protected Attributes | |
| double | efixed |
| double | factorFrom |
| Constant factor for from conversion. | |
| double | factorTo |
| Constant factor for to conversion. | |
| double | t_other |
| Energy mode dependent factor in to conversion. | |
| double | t_otherFrom |
| Energy mode dependent factor in from conversion. | |
| double | unitScaling |
| Apply unit scaling to energy value. | |
Protected Attributes inherited from Mantid::Kernel::Unit | |
| int | emode |
| emode :: The energy mode (0=elastic, 1=direct geometry, 2=indirect geometry) | |
| bool | initialized |
| The unit values have been initialized. | |
| double | l1 |
| l1 :: The source-sample distance (in metres) | |
| 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 | |
| Mantid::Kernel::Units::DeltaE::DeltaE | ( | ) |
Constructor.
Definition at line 936 of file Unit.cpp.
References Mantid::Kernel::Unit::addConversion(), Mantid::PhysicalConstants::meVtoFrequency, and Mantid::PhysicalConstants::meVtoWavenumber.
Referenced by clone().
|
inlineoverridevirtual |
|
overridevirtual |
Implements Mantid::Kernel::Unit.
Reimplemented in Mantid::Kernel::Units::DeltaE_inWavenumber, and Mantid::Kernel::Units::DeltaE_inFrequency.
Definition at line 1060 of file Unit.cpp.
References DeltaE().
|
overridevirtual |
This function returns maximal TOF value still reversibly convertible into the unit.
Implements Mantid::Kernel::Unit.
Definition at line 1051 of file Unit.cpp.
References efixed, factorFrom, and t_otherFrom.
Referenced by singleToTOF().
|
overridevirtual |
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.
Implements Mantid::Kernel::Unit.
Definition at line 1045 of file Unit.cpp.
References Mantid::Kernel::Unit::emode, and t_otherFrom.
|
overridevirtual |
Finalize the initialization.
This will be overridden by subclasses as needed.
Implements Mantid::Kernel::Unit.
Reimplemented in Mantid::Kernel::Units::DeltaE_inWavenumber, and Mantid::Kernel::Units::DeltaE_inFrequency.
Definition at line 965 of file Unit.cpp.
References Mantid::Kernel::efixed, efixed, Mantid::Kernel::Unit::emode, factorFrom, factorTo, Mantid::Kernel::Unit::l1, Mantid::Kernel::l2, Mantid::Kernel::Unit::m_params, Mantid::PhysicalConstants::meV, Mantid::PhysicalConstants::NeutronMass, t_other, t_otherFrom, and unitScaling.
Referenced by Mantid::Kernel::Units::DeltaE_inWavenumber::init(), and Mantid::Kernel::Units::DeltaE_inFrequency::init().
|
overridevirtual |
A label for the unit to be printed on axes,.
Implements Mantid::Kernel::Unit.
Reimplemented in Mantid::Kernel::Units::DeltaE_inWavenumber, and Mantid::Kernel::Units::DeltaE_inFrequency.
Definition at line 934 of file Unit.cpp.
References Mantid::Kernel::Units::Symbol::MilliElectronVolts.
|
overridevirtual |
Convert a single tof value to this unit.
| tof | value to convert |
Implements Mantid::Kernel::Unit.
Definition at line 1022 of file Unit.cpp.
References efixed, Mantid::Kernel::Unit::emode, factorFrom, t_otherFrom, and unitScaling.
|
overridevirtual |
Convert a single X value to TOF.
| x | value to convert |
Implements Mantid::Kernel::Unit.
Definition at line 998 of file Unit.cpp.
References conversionTOFMax(), efixed, Mantid::Kernel::Unit::emode, factorTo, t_other, unitScaling, and Mantid::Geometry::x.
|
overridevirtual |
"DeltaE"
Implements Mantid::Kernel::Unit.
Reimplemented in Mantid::Kernel::Units::DeltaE_inWavenumber, and Mantid::Kernel::Units::DeltaE_inFrequency.
Referenced by validateUnitParams().
|
overrideprotectedvirtual |
Reimplemented from Mantid::Kernel::Unit.
Definition at line 942 of file Unit.cpp.
References Mantid::Kernel::efixed, Mantid::Kernel::Unit::emode, Mantid::Kernel::l2, and unitID().
|
protected |
Definition at line 464 of file Unit.h.
Referenced by conversionTOFMax(), init(), singleFromTOF(), and singleToTOF().
|
protected |
Constant factor for from conversion.
Definition at line 466 of file Unit.h.
Referenced by conversionTOFMax(), init(), and singleFromTOF().
|
protected |
Constant factor for to conversion.
Definition at line 465 of file Unit.h.
Referenced by init(), and singleToTOF().
|
protected |
Energy mode dependent factor in to conversion.
Definition at line 467 of file Unit.h.
Referenced by init(), and singleToTOF().
|
protected |
Energy mode dependent factor in from conversion.
Definition at line 468 of file Unit.h.
Referenced by conversionTOFMax(), conversionTOFMin(), init(), and singleFromTOF().
|
protected |
Apply unit scaling to energy value.
Definition at line 469 of file Unit.h.
Referenced by init(), Mantid::Kernel::Units::DeltaE_inWavenumber::init(), Mantid::Kernel::Units::DeltaE_inFrequency::init(), singleFromTOF(), and singleToTOF().